Bug 171703

Summary: Eclipse cannot find source for *.class files
Product: [Eclipse Project] JDT Reporter: David Pérez <david.perez.ingeniero>
Component: CoreAssignee: Olivier Thomann <Olivier_Thomann>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: philippe_mulet
Version: 3.1.2   
Target Milestone: 3.3.1   
Hardware: PC   
OS: Windows Server 2003   
Whiteboard:
Attachments:
Description Flags
Source code of the jar file
none
Jar file that cannot find sources
none
Jar file compiled by Eclipse. It can find sources
none
Proposed fix none

Description David Pérez CLA 2007-01-25 11:46:30 EST
Build ID: M20060921-0945

Steps To Reproduce:
1. Create a Java project
2. Use the jregex 1.2_01 http://jregex.sourceforge.net
3. Specify its source code (contained in a .zip in the project)
4. Insert some code that uses a class in that library.
5. I choose F3 to navigate to the source of i.e.
6. Eclipse complains it cannot find the source
7. Compile myself the project and place *.class inside a jar
8. Replace the new jar (with debug info) with the old one
8. Now Eclipse can find the class

More information:
I expect both jars to work the same way.
Comment 1 David Pérez CLA 2007-01-25 11:48:29 EST
Created attachment 57522 [details]
Source code of the jar file
Comment 2 David Pérez CLA 2007-01-25 11:49:26 EST
Created attachment 57523 [details]
Jar file that cannot find sources
Comment 3 David Pérez CLA 2007-01-25 11:50:56 EST
Created attachment 57524 [details]
Jar file compiled by Eclipse. It can find sources

Compiled in a separate project.
With debug info.
Comment 4 Olivier Thomann CLA 2007-06-22 14:33:13 EDT
Created attachment 72208 [details]
Proposed fix

This fix corrects the source file name in case it contains the package name.
Do you know what compiler was used to compile the .class files inside the first jar file ?
Comment 5 Olivier Thomann CLA 2007-06-22 14:33:39 EDT
Philippe,
candidate for 3.3.1 ?
Comment 6 David Pérez CLA 2007-06-26 02:45:34 EDT
No, I don't know the compiler.
You could ask the jregex folks.
Comment 7 Philipe Mulet CLA 2007-06-26 06:57:10 EDT
+1 for 3.3.1. Being resilient is always a good idea.
Comment 8 Olivier Thomann CLA 2007-07-04 11:06:33 EDT
Released for 3.4M1.
No regression test added as this would require to build an invalid source attribute.
Verifier, please use the steps in comment 0 to verify this fix.
Comment 9 Olivier Thomann CLA 2007-07-04 11:56:28 EDT
Released for 3.3.1.
No regression test added as this would require to build an invalid source
attribute.
Verifier, please use the steps in comment 0 to verify this fix.
Comment 10 Frederic Fusier CLA 2007-08-07 05:33:21 EDT
Verified for 3.4M1 using build I20070806-1800.
Comment 11 Frederic Fusier CLA 2007-08-07 05:34:17 EDT
Reopen for 3.3.1 verification
Comment 12 Frederic Fusier CLA 2007-08-07 06:14:50 EDT
.
Comment 13 Eric Jodet CLA 2007-09-03 07:35:20 EDT
Verified for 3.3.1 using build M20070831-2000