Bug 272450

Summary: DBCS3.5: Classpath resolution fails to honor the 'Class-Path' header of JAR manifest file in DBCS
Product: [Eclipse Project] JDT Reporter: Masaihko Maedera <maedera>
Component: CoreAssignee: Olivier Thomann <Olivier_Thomann>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: camle, david_audel, kitlo, Olivier_Thomann, pwebster
Version: 3.5   
Target Milestone: 3.5 M7   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Eclipse Project Archive (CallTest)
none
Proposed fix
none
Proposed fix + regression test none

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.