United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6759796 test/tools/javac/6348193/T6348193.java fails if there are empty entries on the bootclasspath
JDK-6759796 : test/tools/javac/6348193/T6348193.java fails if there are empty entries on the bootclasspath

Details
Type:
Bug
Submit Date:
2008-10-15
Status:
Closed
Updated Date:
2011-05-18
Project Name:
JDK
Resolved Date:
2011-05-18
Component:
tools
OS:
generic
Sub-Component:
javac
CPU:
generic
Priority:
P3
Resolution:
Fixed
Affected Versions:
7
Fixed Versions:

Related Reports
Backport:

Sub Tasks

Description
The Java syystem (boot) classloader is inconsistent w.r.t. empty entries on the bootclasspath. They are ignored for the purposes of loading classes, but not ignored when locating resources. The latter behavior affects this test which uses getResource() to locate a class file. In the specific circumstances of this test (which is in the unnamed package, per usual), the empty path element can cause getResource to return an unexpected result.

The fix/workaround is to use System.getProperties("test.classes") instead of getResource().

                                    

Comments
EVALUATION

The fix/workaround is to use System.getProperties("test.classes") instead of getResource().
                                     
2008-10-15



Hardware and Software, Engineered to Work Together