RFR: 8333749: Consolidate ConstantDesc conversion in java.base [v2]

Jorn Vernee jvernee at openjdk.org
Thu Jun 6 19:42:44 UTC 2024


On Thu, 6 Jun 2024 19:24:14 GMT, Chen Liang <liach at openjdk.org> wrote:

>> In java.base, especially in bytecode generators, we have many different methods converting known valid Class and MethodType into ClassDesc and MethodTypeDesc. These conversions should be consolidated into the same utility method for the ease of future maintenance.
>
> Chen Liang has updated the pull request incrementally with one additional commit since the last revision:
> 
>   mt -> md (desc)

src/java.base/share/classes/jdk/internal/constant/ConstantUtils.java line 76:

> 74:      * type and parameter types can be described nominally.
> 75:      */
> 76:     public static MethodTypeDesc methodDesc(MethodType type) {

Please name these methods `methodTypeDesc`, since we also have the `Method` type.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/19585#discussion_r1630114413


More information about the core-libs-dev mailing list