RFR: 8210275: Source Launcher should fail if --source is used without a source file

mandy chung mandy.chung at oracle.com
Fri Sep 21 21:51:21 UTC 2018



On 9/21/18 4:32 AM, Alan Bateman wrote:
> On 20/09/2018 21:56, mandy chung wrote:
>> :
>>
>> FWIW.  It reads to me that the launcher mode should not be set to 
>> LM_CLASS
>> when parsing -cp option as it does not know the mode until all 
>> options are
>> parsed. Then set to LM_CLASS if mode == LM_UNKNOWN (if not set).
>> But this requires closer inspection of the current implementation and 
>> it's
>> something for the future.
> This is somewhat fragile area of the launcher code. I don't think the 
> processing of --class-path should set the mode as the class path can 
> be used in conjunction with other options. The -jar and -m option will 
> select the mode of course but other cases should probably leave it as 
> LM_UNKNOWN until the final determination with IsSourceFile.

I file https://bugs.openjdk.java.net/browse/JDK-8211033 and we could 
clean this up in the future.

Mandy


More information about the core-libs-dev mailing list