JDK 9 RFR of JDK-8036842: Remove unneeded/obsolete -source/-target options in javac tests, part 2

Joe Darcy joe.darcy at oracle.com
Fri Mar 7 17:34:48 UTC 2014


Hi Sonali,

On 03/07/2014 02:06 AM, Sonali Goel wrote:
> Hello,
>
> The changes look fine. A couple of questions/comments:
> - test/tools/javac/meth/InvokeMH.java - Why did you remove -source 7 
> -target 7 from the code?

Because it wasn't needed :-)

For source code in the JDK regression tests, we should accept the 
default source / target levels unless there is a need to specify a 
different one. The canonical uses case for us is specifying an earlier 
source version for a negative test.

Since the features in question work in source/target 7 and higher, these 
don't need to be specified in JDK 9.

> - test/tools/javac/api/T6265137.java - Why is -source 9 needed?

This test was for a bug where setting target using the API interface 
caused an exception so I left in setting a target.

> - test/tools/javac/ClassLit.java - trivial comment - no need to add 
> @compile line

Removed.

Thanks,

-Joe

>
> Thanks,
> Sonali
>
> On 3/6/2014 11:40 PM, Joe Darcy wrote:
>> Hello,
>>
>> Please review the webrev of changes for
>>
>>     JDK-8036842: Remove unneeded/obsolete -source/-target options in 
>> javac tests, part 2
>>     http://cr.openjdk.java.net/~darcy/8036842.0/
>>
>> The langtools regression tests suite still passes with these changes 
>> in place.
>>
>> Thanks,
>>
>> -Joe
>



More information about the compiler-dev mailing list