RFR: JDK-8275308: Add valueOf(Runtime.Version) factory to SourceVersion [v3]
Joe Darcy
darcy at openjdk.java.net
Wed Oct 27 16:52:11 UTC 2021
On Mon, 25 Oct 2021 21:58:01 GMT, Joe Darcy <darcy at openjdk.org> wrote:
>> if could be potentially dropped since valueOf("RELEASE_" + feature) is throwing IAE already.
>
> Updated as suggested.
>
>
> Using `Runtime.version()` as a stand-in for the max `SourceVersion` seems non-obvious. Would it be better to use `SourceVersion.latest().runtimeVersion()` instead?
>
> What about when running this API on JDK N-1?
Updated the supported range to go up to the feature corresponding to SourceVersion.latest().
-------------
PR: https://git.openjdk.java.net/jdk/pull/5973
More information about the compiler-dev
mailing list