Problem
Multiple files use reference equality (==) to compare ActionEvent
objects in doAction() methods:
- GuiPanel.java
- LearningPanel.java
- CreateOpenProjectGUI.java
Example from LearningPanel.java:
if (event == SAVE_BUTTON_PRESSED)
if (event == LOAD_BUTTON_PRESSED)
In Java, == checks reference identity not logical equality. This can
cause button actions to silently fail under certain JVM conditions
where a new ActionEvent instance is constructed rather than reusing
the same reference.
Additionally LearningPanel.java uses:
if (cname != "")
which is also unreliable string reference comparison — should be
!cname.isEmpty()
Problem
Multiple files use reference equality (==) to compare ActionEvent
objects in doAction() methods:
Example from LearningPanel.java:
if (event == SAVE_BUTTON_PRESSED)
if (event == LOAD_BUTTON_PRESSED)
In Java, == checks reference identity not logical equality. This can
cause button actions to silently fail under certain JVM conditions
where a new ActionEvent instance is constructed rather than reusing
the same reference.
Additionally LearningPanel.java uses:
if (cname != "")
which is also unreliable string reference comparison — should be
!cname.isEmpty()