RFR: 8287064: Modernize ProxyGenerator.PrimitiveTypeInfo
Roger Riggs
rriggs at openjdk.java.net
Fri May 20 20:05:45 UTC 2022
On Fri, 20 May 2022 04:55:37 GMT, liach <duke at openjdk.java.net> wrote:
> Simplify opcode handling, use `final` in `PrimitiveTypeInfo`, and replace the hash map with a simple lookup, similar to what's done in [JDK-8284880](https://bugs.openjdk.java.net/browse/JDK-8284880) (#8242)
src/java.base/share/classes/java/lang/reflect/ProxyGenerator.java line 932:
> 930: */
> 931: private static final class PrimitiveTypeInfo {
> 932: private static final PrimitiveTypeInfo BYTE = new PrimitiveTypeInfo(byte.class, 0);
Can this be `private enum PrimitiveTypeInfo...` or perhaps a record class?
-------------
PR: https://git.openjdk.java.net/jdk/pull/8801
More information about the core-libs-dev
mailing list