RFR: 8306729: Add nominal descriptors of modules and packages to Constants API [v13]
Mandy Chung
mchung at openjdk.org
Wed Apr 26 17:54:24 UTC 2023
On Wed, 26 Apr 2023 10:46:24 GMT, Adam Sotona <asotona at openjdk.org> wrote:
>> Constants API already provides models for all loadable constants to help programs manipulating class files and modelling bytecode instructions. However no models of module and package constants are provided by Constants API. Every program manipulating class files must implement own models and validation of modules and packages constants.
>>
>> This pul request adds `java.lang.constant.ModuleDesc` and `java.lang.constant.PackageDesc` to the Constants API.
>>
>> Classfile API will follow up and remove its internal implementations of `PackageDesc` and `ModuleDesc`.
>>
>> Please review this pull request and attached CSR.
>>
>> Thank you,
>> Adam
>
> Adam Sotona has updated the pull request incrementally with one additional commit since the last revision:
>
> removed prefixes from name methods
Thanks for the update. Two typos. please do `make docs` to verify the output.
src/java.base/share/classes/java/lang/constant/PackageDesc.java line 71:
> 69: * correct format
> 70: * @jvms 4.2.1 Binary Class and Interface Names
> 71: * @jvm 4.2.3 Module and Package Names
Suggestion:
* @jvms 4.2.3 Module and Package Names
src/java.base/share/classes/java/lang/constant/PackageDesc.java line 104:
> 102: * Compare the specified object with this descriptor for equality.
> 103: * Returns {@code true} if and only if the specified object is
> 104: * also a {@linkp PackageDesc} and both describe the same package.
Suggestion:
* also a {@link PackageDesc} and both describe the same package.
-------------
Marked as reviewed by mchung (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/13615#pullrequestreview-1402503600
PR Review Comment: https://git.openjdk.org/jdk/pull/13615#discussion_r1178204923
PR Review Comment: https://git.openjdk.org/jdk/pull/13615#discussion_r1178205091
More information about the core-libs-dev
mailing list