On Wed, 21 Jan 2026 10:31:14 GMT, Maurizio Cimadamore <[email protected]>
wrote:
>> Vicente Romero has updated the pull request incrementally with two
>> additional commits since the last revision:
>>
>> - removing unused variable
>> - addressing review comments
>
> src/jdk.compiler/share/classes/com/sun/tools/javac/comp/NullChecksWriter.java
> line 95:
>
>> 93: } else {
>> 94: useSiteNullChecks = switch (opt) {
>> 95: case "none" -> UseSiteNullChecks.NONE;
>
> You could make the code a bit tighter by moving the names like "none" etc.
> inside the Enum (e.g. each constant has its own name). Then you can have an
> enum factory that takes a String (the javac option value) and returns the
> corresponding enum, if any is found. We use that pattern elsewhere in javac
sure, done
-------------
PR Review Comment:
https://git.openjdk.org/valhalla/pull/1939#discussion_r2712812178