On Fri, 20 May 2022 04:55:37 GMT, liach <d...@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

Reply via email to