RFR: 8301133: IGV: NPE occurs when creating a diff graph with a graph in a different folder

Koichi Sakata ksakata at openjdk.org
Thu Jan 26 10:12:56 UTC 2023


NullPointerException occurs when we create a diff graph with graphs in different folders. In this case, the graph's group doesn't have a parent. So the `getParent()` call in the Group class returns null.

A diff graph in the same folder show the text "[index] - [folder name]" in the tooltip. In this pull request, a diff graph with graphs in different folders shows the fixed string "Difference" because that string is set to the group name when a diff graph is created.

<img width="700" alt="スクリーンショット 2023-01-26 16 47 57" src="https://user-images.githubusercontent.com/60008/214790051-c236f580-3dcd-4e63-80ee-12a766736185.png">

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

Commit messages:
 - Show the group name in tooltip
 - Return an empty string when parent is null

Changes: https://git.openjdk.org/jdk/pull/12214/files
 Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=12214&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8301133
  Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod
  Patch: https://git.openjdk.org/jdk/pull/12214.diff
  Fetch: git fetch https://git.openjdk.org/jdk pull/12214/head:pull/12214

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


More information about the hotspot-compiler-dev mailing list