RFR: JDK-8301460: Clean up LambdaForm to reference BasicType enums directly
Jorn Vernee
jvernee at openjdk.org
Tue Feb 14 10:57:42 UTC 2023
On Mon, 13 Feb 2023 22:05:15 GMT, Mandy Chung <mchung at openjdk.org> wrote:
> `LambdaForm` declares int constants for `BasicType::ordinal` to workaround JDK-8161245. Now these int constants are no longer needed. This removes these int constants and reference `BasicType` enums directly.
src/java.base/share/classes/java/lang/invoke/BoundMethodHandle.java line 371:
> 369: extensions[typeNum] = sd;
> 370: return sd;
> 371: }
I suggest changing the existing overload to delegate to this one with `BasicType.basicType(typeNum)` as the argument. (or to use some other way to reduce the duplication)
-------------
PR: https://git.openjdk.org/jdk/pull/12546
More information about the core-libs-dev
mailing list