Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 339308 - 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.2.4   Edit
Assignee: Carl Anderson CLA
QA Contact: Chuck Bridgham CLA
URL:
Whiteboard:
Keywords:
Depends on: 339307
Blocks:
  Show dependency tree
 
Reported: 2011-03-08 22:35 EST by Carl Anderson CLA
Modified: 2011-03-09 14:21 EST (History)
0 users

See Also:
cbridgha: review+


Attachments
Same fix as 339307 (1.01 KB, patch)
2011-03-08 22:41 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:35:57 EST
This bug is to get the same change into WTP 3.2.4 and WTP 3.3

+++ This bug was initially created as a clone of Bug #339307 +++

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:41:37 EST
Created attachment 190724 [details]
Same fix as 339307
Comment 2 Chuck Bridgham CLA 2011-03-09 12:54:58 EST
approved
Comment 3 Carl Anderson CLA 2011-03-09 14:21:57 EST
Committed to R3_2_maintenance and HEAD for WTP 3.2.4 and WTP 3.3