RFR: 8287064: Modernize ProxyGenerator.PrimitiveTypeInfo [v2]

Roger Riggs rriggs at openjdk.java.net
Tue May 24 17:29:03 UTC 2022


On Fri, 20 May 2022 22:18:42 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)
>
> liach has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Convert PrimitiveTypeInfo to an enum

Looks good.

Did you consider switch (class) {...} in PrimitiveTypeInfo.get?  
The `if` cascade may be quicker given the expected distribution of lookups.

-------------

Marked as reviewed by rriggs (Reviewer).

PR: https://git.openjdk.java.net/jdk/pull/8801


More information about the core-libs-dev mailing list