RFR: JDK-8294565: IGV: ClassCastException when clicking on an edge in the graph

Tobias Holenstein tholenstein at openjdk.org
Fri Oct 21 10:49:21 UTC 2022


IGV crashed when the user clicked on any edge in the graph because the `select` method of the `SelectProvider` in `LineWidget.java` was faulty. 

# Implementation
- `ActionFactory.createSelectAction` was changed to `CustomSelectAction` since it also supports to invert the selection with `Ctrl/CMD`
- The `select` method gets called when the user clicks on an edge. `LineWidget` represents a single connection going out of a node and connecting to one or more nodes (one-to-many). `LineWidget` has a list of `Connection`'s that each represent a single link between two nodes (one-to-one). For each `connection` we collect the from/to `Vertex` (superclass for a node) and put them into a set that we then use to select the nodes that are connected to the user-clicked `LineWidget`.

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

Commit messages:
 - refactor related code
 - IGV: ClassCastException when clicking on an edge in the graph

Changes: https://git.openjdk.org/jdk/pull/10760/files
 Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=10760&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8294565
  Stats: 88 lines in 2 files changed: 18 ins; 15 del; 55 mod
  Patch: https://git.openjdk.org/jdk/pull/10760.diff
  Fetch: git fetch https://git.openjdk.org/jdk pull/10760/head:pull/10760

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


More information about the hotspot-compiler-dev mailing list