RFR: 8313422: test/langtools/tools/javac 147 test classes uses com.sun.tools.classfile library

Adam Sotona asotona at openjdk.org
Wed Sep 6 15:44:42 UTC 2023


On Fri, 1 Sep 2023 13:09:45 GMT, Adam Sotona <asotona at openjdk.org> wrote:

>> There are 147 tests to convert to the new Class-File API.
>
> test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/Driver.java line 201:
> 
>> 199:                     table.add(TypeAnnotation.LocalVarTargetInfo.of(null, null, d.lvarIndex()[idx]));
>> 200:                 p = TypeAnnotation.TargetInfo.ofResourceVariable(table);
>> 201:             }
> 
> Filling missing labels with null is not ideal.
> All such unsupported cases should directly throw an exception to indicate invalid state of the test.
> BTW silent acceptance of null labels by TypeAnnotation.TargetInfo factory methods is a bug.

FYI: I've filled [bug #8315541](https://bugs.openjdk.org/browse/JDK-8315541)

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

PR Review Comment: https://git.openjdk.org/jdk/pull/15112#discussion_r1313033243


More information about the compiler-dev mailing list