<core-libs-dev> New constructor in sun.tools.java.ClassPath builds a path using File.separator instead of File.pathSeparatorChar

Deven You youdwei at linux.vnet.ibm.com
Mon Apr 9 07:01:00 UTC 2012


Hi core-libs-devs,

There are 2 sun bugs related to this issue:

http://bugs.sun.com/view_bug.do;jsessionid=663548580556affffffffe43f50bf92c75b5?bug_id=6695325^and
http://bugs.sun.com/view_bug.do;jsessionid=663548580556affffffffe43f50bf92c75b5?bug_id=6610897^

The basic problem is that the new constructor

     public ClassPath(String[] patharray)  which calls new private method

     private void init(String}[] patharray)

The init method builds a pathstr using File.separator instead of 
File.pathSeparatorChar.

Since it is really a bug and the fix is simple, I have made a patch[1] 
for this issue and a test case[2] to recreated this issue.

The patch just uses File.pathSeparatorChar to replace File.separator.

Please anyone can review it?

Thanks a lot!

[1] http://cr.openjdk.java.net/~youdwei/classpath/webrev.00/ 
<http://cr.openjdk.java.net/%7Eyoudwei/classpath/webrev.00/>
[2] http://cr.openjdk.java.net/~youdwei/classpath/test/webrev.00/ 
<http://cr.openjdk.java.net/%7Eyoudwei/classpath/test/webrev.00/>

-- 
Best Regards,

Deven




More information about the core-libs-dev mailing list