Make `NMethod.toString()` and `NMethod.getName()` null-safe: if `getMethod()` returns null, return a description based on `super.toString()` instead of dereferencing the method. This allows the original exception to be reported so that a genuine decoding failure is visible in the test output. --------- - [x] I confirm that I make this contribution in accordance with the [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai).
------------- Commit messages: - serviceability/sa/TestDebugInfoDecode.java fails with NPE Changes: https://git.openjdk.org/jdk/pull/34189/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=34189&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8398883 Stats: 6 lines in 1 file changed: 6 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/34189.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/34189/head:pull/34189 PR: https://git.openjdk.org/jdk/pull/34189
