Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 357421 - Utility jars in EAR50/lib or EAR/ cannot be edited in in EAR Java EE Module Dependencies page
Summary: Utility jars in EAR50/lib or EAR/ cannot be edited in in EAR Java EE Module D...
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: Diego Sahagun CLA
QA Contact: Chuck Bridgham CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-12 17:16 EDT by Diego Sahagun CLA
Modified: 2012-02-22 15:39 EST (History)
2 users (show)

See Also:
cbridgha: review+


Attachments
Fix patch (9.01 KB, patch)
2011-09-13 15:40 EDT, Diego Sahagun CLA
ccc: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Diego Sahagun CLA 2011-09-12 17:16:03 EDT
Build Identifier: 3.4.2_v20090122

The entries for utility Jars in this page are disabled making impossible to disable the utility or activate the "In Lib Dir" option.

Reproducible: Always

Steps to Reproduce:
1. Create an EAR project with all defaults
2. Open the Import J2EE Utility Jar wizard
3. Select the option to "Copy utility jars into an existing EAR from an external location"
4. Locate the Utility jar and finish the wizard
5. Select the EAR you created and bring up the properties page
6. Go to Java EE Module dependencies page and see the disabled item
Comment 1 Diego Sahagun CLA 2011-09-12 17:18:54 EDT
The fix for Bug 349741 uncovered some additional issues that were not caught during testing but during verification instead.
Comment 2 Diego Sahagun CLA 2011-09-13 15:40:32 EDT
Created attachment 203292 [details]
Fix patch

I noticed that the method getWorkspaceRelativePath() form VirtualArchiveComponent class is not consistent on its results, it returns a path including the EAR when the utility jars were just copied (not in component file) and returns a path excluding the EAR when utility jars have been imported (present in component file). The method is deprecated in newer streams so the fix to this is basically add some shielding code to the places where the method is used.
Comment 3 Chuck Bridgham CLA 2011-09-19 14:00:39 EDT
approved
Comment 4 Carl Anderson CLA 2011-09-19 21:30:51 EDT
The Java 6 method Arrays.copyOfRange() caused errors.
Comment 5 Diego Sahagun CLA 2011-09-27 16:46:54 EDT
Resolving since this was committed and released on Sept 23 by Carl.

Thanks Carl for the Arrays.copyOfRange() correction.