RFR: 8293051: Further refactor javac after removal of -source/-target/--release 7 [v2]

Vicente Romero vromero at openjdk.org
Fri Sep 2 21:54:43 UTC 2022


On Fri, 2 Sep 2022 21:42:16 GMT, Joe Darcy <darcy at openjdk.org> wrote:

>> Vicente Romero has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   fixing additional test
>
> src/jdk.compiler/share/classes/com/sun/tools/javac/code/Source.java line 216:
> 
>> 214:         POLY(JDK8),
>> 215:         LAMBDA(JDK8, Fragments.FeatureLambda, DiagKind.PLURAL),
>> 216:         DEFAULT_METHODS(JDK8, Fragments.FeatureDefaultMethods, DiagKind.PLURAL),
> 
> As noted in https://github.com/openjdk/jdk/pull/10074#issuecomment-1230998246, if DEFAULT_METHODS is removed, there is a core libs test that will fail.
> 
> I believe the functionality request is a standard idiom for forcing a source file to be compiled as Preview. Merely setting -XDpreview (however that hidden option is spelled) is not sufficient. A feature that triggers a checkSourceLevel call is needed too.

that can be worked out I think as I did with other tests, it should show up in the mach5 run, are you referring to: `PreviewHiddenClass.java`?

-------------

PR: https://git.openjdk.org/jdk/pull/10150


More information about the compiler-dev mailing list