RFR: 8294969: Convert jdk.jdeps javap to use the Classfile API [v11]
Adam Sotona
asotona at openjdk.org
Thu Sep 7 08:28:54 UTC 2023
On Wed, 6 Sep 2023 19:55:49 GMT, Vicente Romero <vromero at openjdk.org> wrote:
>> Adam Sotona has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 227 commits:
>>
>> - Merge branch 'master' into JDK-8294969-javap
>> - Merge branch 'master' into JDK-8294969-javap
>> - fixed code printing and ConstantPoolException reporting indoex
>> - added DydnamicConstantPoolEntry::bootstrapMethodIndex
>> fix of javap ConstantWriter to print DynamicConstantPoolEntry without accessing BSM attribute
>> - extended ClassReader about specific entry-reading methods to avoid class cast and throw ConstantPoolException instead
>> - throwing ConstantPoolException for invalid BSM entry index
>> - Merge branch 'master' into JDK-8294969-javap
>> - fixed JavapTask
>> - Merge branch 'master' into JDK-8294969-javap
>> - Merge branch 'master' into JDK-8294969-javap
>>
>> # Conflicts:
>> # src/java.base/share/classes/jdk/internal/classfile/constantpool/ConstantPoolException.java
>> - ... and 217 more: https://git.openjdk.org/jdk/compare/37c756a7...4960751b
>
> test/langtools/tools/javap/8260403/T8260403.java line 42:
>
>> 40: new String[]{"-c", System.getProperty("test.classes") + "/InvalidSignature.class"},
>> 41: new PrintWriter(sw));
>> 42: System.out.println(sw);
>
> is this for debug purpose only?
It is the test fix.
8260403 says "javap should be more robust", however to expect zero exit code for invalid class is wrong.
It suppose to expect non-zero exit code and fail only on fatal errors or unhandled CP errors.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/11411#discussion_r1318264327
More information about the compiler-dev
mailing list