On Wed, 25 Jan 2023 13:14:43 GMT, Adam Sotona <asot...@openjdk.org> wrote:

>> This is root pull request with Classfile API implementation, tests and 
>> benchmarks initial drop into JDK.
>> 
>> Following pull requests consolidating JDK class files parsing, generating, 
>> and transforming 
>> ([JDK-8294957](https://bugs.openjdk.org/browse/JDK-8294957)) will chain to 
>> this one.
>> 
>> Classfile API development is tracked at:
>> https://github.com/openjdk/jdk-sandbox/tree/classfile-api-branch
>> 
>> Development branch of consolidated JDK class files parsing, generating, and 
>> transforming is at:
>> https://github.com/openjdk/jdk-sandbox/tree/classfile-api-dev-branch
>> 
>> Classfile API [JEP](https://bugs.openjdk.org/browse/JDK-8280389) and [online 
>> API 
>> documentation](https://htmlpreview.github.io/?https://raw.githubusercontent.com/openjdk/jdk-sandbox/classfile-api-javadoc-branch/doc/classfile-api/javadoc/java.base/jdk/classfile/package-summary.html)
>>  is also available.
>> 
>> Please take you time to review this non-trivial JDK addition.
>> 
>> Thank you,
>> Adam
>
> Adam Sotona has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   merged JAVAC_FLAGS and EXCLUDES in Java.gmk

(not a reviewer) From a quick look at it, I noticed two things:

1. Input validation: As an example, it is possible to call 
`ClassfileVersion.of(-1, -1)`, and also use it to create a classfile from it. 
It looks like it is possible to create a classfile byte array with such a 
version, and the upper int bits are just ignored when writing the version. 
Should something like that be validated before? How much validation do you 
generally want to do (also regarding nullability etc)?

2. I've seen interfaces with `sealed public` aswell as `public sealed` as 
modifier order. I think this should be consistent. (maybe it also makes sense 
to add `sealed` to the `blessed-modifier-order.sh`?)

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

PR: https://git.openjdk.org/jdk/pull/10982

Reply via email to