Bug 272450 - DBCS3.5: Classpath resolution fails to honor the 'Class-Path' header of JAR manifest file in DBCS
Summary: DBCS3.5: Classpath resolution fails to honor the 'Class-Path' header of JAR m...
Status: CLOSED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.5   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.5 M7   Edit
Assignee: Olivier Thomann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-04-16 04:07 EDT by Masaihko Maedera CLA
Modified: 2009-05-07 23:22 EDT (History)
5 users (show)

See Also:


Attachments
Eclipse Project Archive (CallTest) (24.66 KB, application/x-zip-compressed)
2009-04-16 04:07 EDT, Masaihko Maedera CLA
no flags Details
Proposed fix (9.52 KB, patch)
2009-04-17 14:51 EDT, Olivier Thomann CLA
no flags Details | Diff
Proposed fix + regression test (39.16 KB, patch)
2009-04-17 16:07 EDT, Olivier Thomann CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Masaihko Maedera CLA 2009-04-16 04:07:01 EDT
Created attachment 132034 [details]
Eclipse Project Archive (CallTest)

Build ID: I20090313-0100

Steps To Reproduce:
1. Import CallTest.zip attached in this report.(images/image1.png)
2. Click the mouse right button on CallTest project.
3. [Build Path] > [Configure Build Path...] > [Libraries] > [Add JARs].
4. Register calling.jar into Build Path.
5. Verify the errors disappear.
6. Verify calling.jar and called.jar move into Referenced Libraries (images/image2.png)
7. These are a correct behavior in http://download.eclipse.org/eclipse/downloads/drops/S-3.5M3-200810301917/eclipse-news-M3.html.
8. Repeat the step 3, remove calling.jar and register calling\u3042.jar.
9. Verify the errors disappear.
10. Verify only calling\u3042.jar moves into Referenced Libraries (images/image3.png), This is a wrong behavior.
11. Then open META-INF/MANIFEST.MF in calling\u3042.jar.
12. The output is not correct (images/image4.png)



More information:
OS: Windows XP, SP2
JRE: IBM JRE 1.6.0
(SUSE Linux can deal with Class-Path and MINIFEST.MF correctly. This happens only under Windows.)
Comment 1 Olivier Thomann CLA 2009-04-17 14:32:53 EDT
The Manifest file needs to be read using UTF-8 encoding. This is the default encoding on most Linux distribution and this would explain why it worked on Linux.
I am investigating.
Comment 2 Olivier Thomann CLA 2009-04-17 14:40:23 EDT
Yes, this is it. Manifest are read using the platform default encoding.
Working on it.
Comment 3 Olivier Thomann CLA 2009-04-17 14:51:10 EDT
Created attachment 132278 [details]
Proposed fix
Comment 4 Olivier Thomann CLA 2009-04-17 14:54:00 EDT
The output is step11/12 depends what is the encoding used to display the file contents.
The patch is fixing the retrieval of chained jars in MANIFEST entries.
Comment 5 Olivier Thomann CLA 2009-04-17 16:07:17 EDT
Created attachment 132292 [details]
Proposed fix + regression test

Changed the previous patch to make the UTF-8 encoding usage inside the analysis code.
Adapted all existing tests and added regression test:
org.eclipse.jdt.core.tests.compiler.regression.ManifestAnalyzerTest#testWithOneJarUsingUTF8Name
Comment 6 Olivier Thomann CLA 2009-04-17 16:07:35 EDT
Released for 3.5M7.
Comment 7 David Audel CLA 2009-04-29 11:39:30 EDT
Verified for 3.5M7 using I20090428-0100
Comment 8 Masaihko Maedera CLA 2009-05-07 23:22:25 EDT
I verified this bug had been fixed
on eclipse-SDK-3.5M7-win32.zip (I20090430-2300).
Thank you for your fix.
I will close this bug report.