Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 339307 - Name collisions not properly handled on EAR import
Summary: Name collisions not properly handled on EAR import
Status: RESOLVED FIXED
Alias: None
Product: WTP Java EE Tools
Classification: WebTools
Component: jst.j2ee (show other bugs)
Version: 3.0.5   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.0.5 P   Edit
Assignee: Carl Anderson CLA
QA Contact: Chuck Bridgham CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 339308
  Show dependency tree
 
Reported: 2011-03-08 22:12 EST by Carl Anderson CLA
Modified: 2011-03-17 23:06 EDT (History)
0 users

See Also:
cbridgha: review+


Attachments
Add the missing line of code (1.02 KB, patch)
2011-03-08 22:16 EST, Carl Anderson CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Carl Anderson CLA 2011-03-08 22:12:02 EST
EarComponentImportDataModelProvider has a lot of code to resolve name collisions.  However, due to one missing line, it only attempts to resolve collisions by appending the appropriate module-type suffix - it goes on to try 10 additional suffixes, but this is all ignored due to one missing line in getModuleModels():

defaultModuleNames.add(moduleName + suffix);

By not adding the "new" non-colliding module name into the defaultModuleNames list, the result is that it does not detect a collision if a second module with the same name and of the same type is encountered, and thus the 10 attempts are not made.
Comment 1 Carl Anderson CLA 2011-03-08 22:16:55 EST
Created attachment 190723 [details]
Add the missing line of code
Comment 2 Chuck Bridgham CLA 2011-03-08 22:19:56 EST
approved
Comment 3 Carl Anderson CLA 2011-03-17 23:06:14 EDT
Committed to R3_0_5_patches