RFR: 8325373: Improve StackCounter error reporting for bad switch cases

Adam Sotona asotona at openjdk.org
Tue Apr 23 13:04:39 UTC 2024


ClassFile API `StackMapGenerator` attaches print or hex dump of the method to an error message.
However there is no such attachment when the stack maps generation is  turned off.

This patch moves class print/dump to `impl.Util::dumpMethod`, so it is shared by `StackMapGenerator` and `StackCounter` to provide the same level of details in case of an error.

Please review.

Thank you,
Adam

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

Commit messages:
 - 8325373: Improve StackCounter error reporting for bad switch cases

Changes: https://git.openjdk.org/jdk/pull/18914/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=18914&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8325373
  Stats: 97 lines in 3 files changed: 56 ins; 31 del; 10 mod
  Patch: https://git.openjdk.org/jdk/pull/18914.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/18914/head:pull/18914

PR: https://git.openjdk.org/jdk/pull/18914


More information about the core-libs-dev mailing list