[lworld] RFR: 8351362: Post-process @Strict annotation for testing [v3]

Roger Riggs rriggs at openjdk.org
Tue Mar 18 19:49:28 UTC 2025


On Mon, 17 Mar 2025 21:25:12 GMT, Chen Liang <liach at openjdk.org> wrote:

>> Added a test tool to strictify files and migrated the existing StrictFinalInstanceFieldsTest as an example.
>
> Chen Liang has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Fix a bug and enhance tests

test/lib/jdk/test/lib/value/Strict.java line 1:

> 1: /*

Can we use import `jdk.internal.vm.annotation.Strict` and not introduce a duplicate annotation?
This code is already `using jdk.internal.vm.annotation.NullRestricted`.

And/or add a comment here indicating it is an intentional duplication.

test/lib/jdk/test/lib/value/StrictCompiler.java line 61:

> 59: 
> 60:     /**
> 61:      * @param args source and destination

The arguments should be documented.
Typically, command options like --enable-preview come before file (.java) file arguments.
The parsing below seems to have this reversed.
The only args that come after -- are file names that might otherwise be confused with options. (Nothing in this case).
--enable-preview and --source should be handled like --deferSuperCall
`--source` should have its own arg saved and propagated (like javac).

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

PR Review Comment: https://git.openjdk.org/valhalla/pull/1395#discussion_r2001839438
PR Review Comment: https://git.openjdk.org/valhalla/pull/1395#discussion_r2001856813


More information about the valhalla-dev mailing list