Integrated: JDK-8294564: IGV: IllegalArgumentException for "Difference to current graph"

Tobias Holenstein tholenstein at openjdk.org
Tue Oct 4 07:33:51 UTC 2022


On Mon, 3 Oct 2022 13:05:52 GMT, Tobias Holenstein <tholenstein at openjdk.org> wrote:

> "Difference to current graph" opens a new window with a difference graph in IGV. Unfortunately, it was throwing a  `java.lang.IllegalArgumentException`
> 
> # Overview 
> In IGV, for every opened graph, that is not a difference graph, the user can right-click on any other graph in the Outline and select "Difference to current graph". This opens a difference graph showing the difference between the currently opened graph and the selected graph. 
> <img width="478" alt="difference to current" src="https://user-images.githubusercontent.com/71546117/193585135-8e93cb2f-6c05-40c4-9b19-7253ce8d6bd8.png">
> 
> If the current graph is already a difference graph, the function is disabled. Same if the selected graph is identical to the opened one. 
> <img width="508" alt="difference disabled" src="https://user-images.githubusercontent.com/71546117/193585932-4444bb46-7354-4138-81b6-1b11cfad4a8b.png">
> 
> # Implementation
> The problem was that the difference graph did not keep track of which two `InputGraphs` it was based on. Therefore the functions `getFirstGraph()` and `getSecondGraph` in `DiagramViewModel` did not work properly. Now, `InputGraph` keeps track of the first and second `InputGraph` if it is a difference graph (`isDiffGraph`). And `getFirstGraph()` and `getSecondGraph` are updated to return the right `InputGraph`s for difference graphs. 
> 
> ---------
> ### Progress
> - [ ] Change must be properly reviewed (1 review required, with at least 1 [Reviewer](https://openjdk.org/bylaws#reviewer))
> - [x] Change must not contain extraneous whitespace
> - [x] Commit message must refer to an issue
> 
> 
> 
> ### Reviewing
> <details><summary>Using <code>git</code></summary>
> 
> Checkout this PR locally: \
> `$ git fetch https://git.openjdk.org/jdk pull/10533/head:pull/10533` \
> `$ git checkout pull/10533`
> 
> Update a local copy of the PR: \
> `$ git checkout pull/10533` \
> `$ git pull https://git.openjdk.org/jdk pull/10533/head`
> 
> </details>
> <details><summary>Using Skara CLI tools</summary>
> 
> Checkout this PR locally: \
> `$ git pr checkout 10533`
> 
> View PR using the GUI difftool: \
> `$ git pr show -t 10533`
> 
> </details>
> <details><summary>Using diff file</summary>
> 
> Download this PR as a diff file: \
> <a href="https://git.openjdk.org/jdk/pull/10533.diff">https://git.openjdk.org/jdk/pull/10533.diff</a>
> 
> </details>

This pull request has now been integrated.

Changeset: f957ce99
Author:    Tobias Holenstein <tholenstein at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/f957ce995969a39827c17023b083d3bd84a1317c
Stats:     175 lines in 9 files changed: 95 ins; 21 del; 59 mod

8294564: IGV: IllegalArgumentException for "Difference to current graph"

Reviewed-by: rcastanedalo, chagedorn

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

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


More information about the hotspot-compiler-dev mailing list