On Sat, 1 Apr 2023 20:31:05 GMT, Chen Liang <li...@openjdk.org> wrote:

> It's quite complicated to safeguard every potentially erroneous call.

I agree, it is complicated, however possible. The question however is whether 
it is desirable. See for example silently failing `ClhsdbDumpclass` test with 
many safeguarded erroneous calls in 
[JDK-8305490](https://bugs.openjdk.org/browse/JDK-8305490).

Current javap implementation seems to lack the final failure (returning error 
exit code) after any safeguarded error.

> test/langtools/tools/javap/TestClassNameWarning.java line 180:
> 
>> 178:                 cf.magic, cf.minor_version, cf.major_version, 
>> cf.constant_pool,
>> 179:                 cf.access_flags,
>> 180:                 cf.this_class,
> 
> Should we just remove this no-name-class case since it's already an invalid 
> class file?

I've fixed this test so it reflects actual javap behaviour.

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

PR Comment: https://git.openjdk.org/jdk/pull/11411#issuecomment-1495446682
PR Review Comment: https://git.openjdk.org/jdk/pull/11411#discussion_r1168713924

Reply via email to