Review Request: JDK-8172215 java launcher no longer accepts -cp "" empty string
Alan Bateman
Alan.Bateman at oracle.com
Wed Jan 4 14:57:15 UTC 2017
On 04/01/2017 02:03, Mandy Chung wrote:
>> On Jan 3, 2017, at 5:23 PM, Paul Sandoz <paul.sandoz at oracle.com> wrote:
>>
>>
>>> On 3 Jan 2017, at 15:59, Mandy Chung <mandy.chung at oracle.com> wrote:
>>>
>>> http://cr.openjdk.java.net/~mchung/jdk9/webrevs/8172215/webrev.00/
>>>
>>> This fixes the regression caused by JDK-8168836 such that java -cp “” would be accepted. It’s surprise that no launcher test covering such test case. Now it’s added in JavaClassPathTest.
>>>
>>> This patch also renames the testlibrary ModuleSourceBuilder to ModuleInfoMaker as Alan suggested.
>>>
>> 213 private static boolean isWindows = System.getProperty("os.name”)
>>
>> Make it final and rename to IS_WINDOWS ?
>
> Sure. Updated in place.
>
>
The change to libjli/java.c looks good and good to have more test
coverage for these corner cases in JavaClassPathTest.java.
For IS_WINDOWS then having is final and simply doing
System.getProperty("os.name").startsWith("Windows") should be fine.
-Alan
More information about the core-libs-dev
mailing list