RFR: 8295059: test/langtools/tools/javap 12 test classes use com.sun.tools.classfile library

Adam Sotona asotona at openjdk.org
Thu Jul 27 01:41:04 UTC 2023


On Wed, 12 Jul 2023 16:11:38 GMT, Adam Sotona <asotona at openjdk.org> wrote:

>> Hi Adam. Another file of Javac package: test/langtools/tools/javac/classreader/BadClass.java also changed the CP index with sun.tools.classfile API. Can you take a look at it?
>> Until we figured out the way of changing CP index, should I rollback my changes and leave these two tests open?
>
> Classfile API doesn't allow to create an invalid entry.
> I'll investigate if it is worth to extend the API, implement some low-lever workaround or skip this specific test case and leave it with valid class name.

I would suggest to remove the whole testNoNameClass test case as the warning message is tested by  similar testWrongNameClass test case below. Testing specifically for 0 class name CP index is obsolete.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/14837#discussion_r1261435891


More information about the compiler-dev mailing list