Bug 161459 - 9 tests in org.eclipse.jdt.core.tests.compiler.regression fail on IBM Java2 5.0
Summary: 9 tests in org.eclipse.jdt.core.tests.compiler.regression fail on IBM Java2 5.0
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.3   Edit
Hardware: Power PC Linux-GTK
: P3 normal (vote)
Target Milestone: 3.2.2   Edit
Assignee: Olivier Thomann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-10-18 15:14 EDT by Corey Ashford CLA
Modified: 2007-01-16 04:18 EST (History)
1 user (show)

See Also:


Attachments
Patch to getLibraryClasses to account for IBM Java2 5.0 JRE (1.18 KB, patch)
2006-10-18 15:19 EDT, Corey Ashford CLA
no flags Details | Diff
Fix for 3.2 maintenance stream (1.27 KB, patch)
2006-10-20 16:52 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 Corey Ashford CLA 2006-10-18 15:14:56 EDT
9 tests in org.eclipse.jdt.core.tests.compiler.regression fail on IBM Java2 5.0

Seven of these tests all complain of java.lang.Object not being resolved.  The other two fail because "@SuppressWarnings" is a class that cannot be resolved.

I narrowed the problem down to the method org.eclipse.jdt.core.tests.compiler.regression.BatchCompilerTest.getLibraryClasses()

For all JVMs except for MacOS, this method returns JRE_HOME + "/lib/rt.jar".  However, with the IBM JRE, there is no "/lib/rt.jar".  Most of the base classes are in JRE_HOME + "/lib/vm.jar".

The @SuppressWarnings class is in JRE_HOME + "/lib/core.jar".

I have created and will attach a patch that detects the presence of vm.jar, and if its there, it returns JRE_HOME + "/lib/vm.jar" + ":" + JRE_HOME + "/lib/core.jar".  This change now allows these tests to pass.
Comment 1 Corey Ashford CLA 2006-10-18 15:19:41 EDT
Created attachment 52264 [details]
Patch to getLibraryClasses to account for IBM Java2 5.0 JRE
Comment 2 Olivier Thomann CLA 2006-10-18 15:27:46 EDT
We could simply reuse the getJavaClassLibs() method in
org.eclipse.jdt.core.tests.util.Util.
Comment 3 Olivier Thomann CLA 2006-10-18 15:28:47 EDT
I would definitely prefer to reuse code.
Comment 4 Corey Ashford CLA 2006-10-18 16:38:10 EDT
That's fine with me.  I assumed there was a reason to have a separate method in this class.  If that assumption is incorrect, please use the one in Util instead.
Comment 5 Olivier Thomann CLA 2006-10-18 23:32:23 EDT
Released for 3.3M3.
Comment 6 Olivier Thomann CLA 2006-10-20 16:01:56 EDT
4 tests are failing using 3.2.2.
Philippe,

Should I backport to 3.2.2?
Comment 7 Olivier Thomann CLA 2006-10-20 16:52:00 EDT
Created attachment 52430 [details]
Fix for 3.2 maintenance stream
Comment 8 Philipe Mulet CLA 2006-10-23 04:52:08 EDT
+1 for 3.2.2
Comment 9 Olivier Thomann CLA 2006-10-23 16:39:44 EDT
Released for 3.2.2.
Comment 10 David Audel CLA 2006-10-30 09:00:12 EST
Verified for 3.3 M3 using build I20061030-0010
Comment 11 Maxime Daniel CLA 2007-01-16 04:18:03 EST
Verified for 3.2.2 using build M20070112-1200.