RFR: JDK-8290011: IGV: Remove dead code and cleanup [v18]

Roberto Castañeda Lozano rcastanedalo at openjdk.org
Tue Oct 4 17:01:30 UTC 2022


On Tue, 4 Oct 2022 13:39:36 GMT, Tobias Holenstein <tholenstein at openjdk.org> wrote:

>> Cleanup of the code in IGV without changing the functionality.
>> 
>> - removed dead code (unused classes, functions, variables) from the IGV code base
>> - merged (and removed) redundant functions
>> - added explicit position arguments to `layer.xml` - This avoids the position warning during building of IGV
>> - ordered the inputs alphabetically, and used wildcards if >= 5 imports of a particular package
>> - made class variables `final` whenever possible
>> - removed `this.` in `this.funtion()` funciton calls when it was not needed
>> - used lambdas instead of anonymous class if possible
>> - fixed whitespace issues (e.g. double whitespace)
>> - removed not needed copy of `RangeSliderModel tempModel` in `RangeSliderModel.java`
>> - changed `EditorTopComponent` to take `InputGraph` as argument in constructor instead of `Diagram` and moved the creation of the `Diagram` to `DiagramViewModel.java` to increased encapsulation/modularity
>
> Tobias Holenstein has updated the pull request incrementally with one additional commit since the last revision:
> 
>   re-add hideDuplicates.png

Thanks for addressing my comments, Tobias!

I tested the changeset manually and hit the following exception when placing the mouse pointer on graph edges to show their tooltips:


[INFO] java.lang.ClassCastException: class com.sun.hotspot.igv.view.widgets.InputSlotWidget cannot be cast to class com.sun.hotspot.igv.graph.Figure (com.sun.hotspot.igv.view.widgets.InputSlotWidget is in unnamed module of loader org.netbeans.StandardModule$OneModuleClassLoader @17b716f7; com.sun.hotspot.igv.graph.Figure is in unnamed module of loader org.netbeans.StandardModule$OneModuleClassLoader @6fcf432a)
[INFO] 	at com.sun.hotspot.igv.view.widgets.LineWidget$1.select(LineWidget.java:142)
[INFO] 	at org.netbeans.modules.visual.action.SelectAction.mouseReleased(SelectAction.java:86)
[INFO] 	at org.netbeans.api.visual.widget.SceneComponent$Operator$3.operate(SceneComponent.java:535)
[INFO] 	at org.netbeans.api.visual.widget.SceneComponent.processLocationOperator(SceneComponent.java:250)
[INFO] 	at org.netbeans.api.visual.widget.SceneComponent.mouseReleased(SceneComponent.java:137)
[INFO] 	at java.desktop/java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:297)
[INFO] 	at java.desktop/java.awt.Component.processMouseEvent(Component.java:6635)
[INFO] 	at java.desktop/javax.swing.JComponent.processMouseEvent(JComponent.java:3342)
[INFO] 	at java.desktop/java.awt.Component.processEvent(Component.java:6400)
[INFO] 	at java.desktop/java.awt.Container.processEvent(Container.java:2263)
[INFO] 	at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:5011)
[INFO] 	at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2321)
[INFO] 	at java.desktop/java.awt.Component.dispatchEvent(Component.java:4843)
[INFO] 	at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4918)
[INFO] 	at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Container.java:4547)
[INFO] 	at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Container.java:4488)
[INFO] 	at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2307)
[INFO] 	at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2772)
[INFO] 	at java.desktop/java.awt.Component.dispatchEvent(Component.java:4843)
[INFO] 	at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:772)
[INFO] 	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
[INFO] 	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:715)
[INFO] 	at java.base/java.security.AccessController.doPrivileged(Native Method)
[INFO] 	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
[INFO] 	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:95)
[INFO] 	at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:745)
[INFO] 	at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:743)
[INFO] 	at java.base/java.security.AccessController.doPrivileged(Native Method)
[INFO] 	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
[INFO] 	at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:742)
[INFO] 	at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:136)
[INFO] [catch] at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
[INFO] 	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
[INFO] 	at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
[INFO] 	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
[INFO] 	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
[INFO] 	at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)

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

Changes requested by rcastanedalo (Reviewer).

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


More information about the hotspot-compiler-dev mailing list