| Summary: | Duplicate Containers returned from FlatVirtualComponent fetchResources() | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [WebTools] WTP Java EE Tools | Reporter: | Jason Peterson <jasonpet> | ||||||
| Component: | jst.j2ee | Assignee: | Rob Stryker <stryker> | ||||||
| Status: | RESOLVED FIXED | QA Contact: | Chuck Bridgham <cbridgha> | ||||||
| Severity: | normal | ||||||||
| Priority: | P3 | CC: | ccc, stryker | ||||||
| Version: | 3.2 | ||||||||
| Target Milestone: | 3.2 M6 | ||||||||
| Hardware: | PC | ||||||||
| OS: | Windows XP | ||||||||
| Whiteboard: | Flexible Modules | ||||||||
| Bug Depends on: | |||||||||
| Bug Blocks: | 299576 | ||||||||
| Attachments: |
|
||||||||
Created attachment 157872 [details]
The Fix ;)
If the folder is already found, clearly it's not necessary to add it again. doh.
Created attachment 157873 [details]
Try Again
Jason:
In your patch, the utility class does not need to add the method VirtualComponentFlattenUtility.extractFileFromFlatFile(IFlatFile).
All you need to do is File f = (File)manifest.getAdapter(File.class); If you look at the FlatFile code, the adapter method already checks for a file, and if not found, an IFile.
Committed to head. =] |
Getting duplicate folder when using the AddMappedOutputFoldersParticipant. This is occurring on the call to the following: VirtualComponentFlattenUtility.addContainerInternal(IContainer container, IPath path) The getExistingModuleResource calls for the container and its parent are both properly getting the existing containers. However, the problem occurs in addMembersToModuleFolder(parent, new IFlatResource[] {mf}) where the existing members and new members of the parent container are combined. You can recreate this by running the JUnit EARExportOperationTest using the patch located in Bug 299576