Re: RFR: 8325373: Improve StackCounter error reporting for bad switch cases [v2]
> 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 Adam Sotona has updated the pull request incrementally with one additional commit since the last revision: applied suggested changes - Changes: - all: https://git.openjdk.org/jdk/pull/18914/files - new: https://git.openjdk.org/jdk/pull/18914/files/f59654be..1824d1fa Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk=18914=01 - incr: https://webrevs.openjdk.org/?repo=jdk=18914=00-01 Stats: 2 lines in 1 file changed: 0 ins; 0 del; 2 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
Re: RFR: 8325373: Improve StackCounter error reporting for bad switch cases [v2]
On Wed, 24 Apr 2024 22:48:30 GMT, Paul Sandoz wrote: >> Adam Sotona has updated the pull request incrementally with one additional >> commit since the last revision: >> >> applied suggested changes > > src/java.base/share/classes/jdk/internal/classfile/impl/Util.java line 229: > >> 227: }; >> 228: ClassPrinter.toYaml(clm.methods().get(0).code().get(), >> ClassPrinter.Verbosity.TRACE_ALL, dump); >> 229: } catch (Error | Exception suppresed) { > > If you like you can replace `suppresed` [sic] with `_`. Both fixed, thanks for the review. - PR Review Comment: https://git.openjdk.org/jdk/pull/18914#discussion_r1578982248