RFR: 8293051: Further refactor javac after removal of -source/-target/--release 7 [v2]
Joe Darcy
darcy at openjdk.org
Fri Sep 2 21:46:00 UTC 2022
On Fri, 2 Sep 2022 21:35:46 GMT, Vicente Romero <vromero at openjdk.org> wrote:
>> This PR is a continuation of PR [1] which removed support for source and target 1.7 option in javac. This is is removing additional switches in javac that were providing support to legacy behavior related to source and target 1.7. What else could be missing?
>>
>> TIA
>>
>> [1] https://github.com/openjdk/jdk/pull/10074
>
> 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.
-------------
PR: https://git.openjdk.org/jdk/pull/10150
More information about the compiler-dev
mailing list