Skip to content

Commit 6aecbcb

Browse files
CopilotDanySK
andauthored
fix(swingui): replace invalid Optional.set() with field reassignment
Agent-Logs-Url: https://github.com/AlchemistSimulator/Alchemist/sessions/81d95530-b420-47ed-a40d-0b662f7526fa Co-authored-by: DanySK <1991673+DanySK@users.noreply.github.com>
1 parent 23acbbc commit 6aecbcb

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

alchemist-swingui/src/main/java/it/unibo/alchemist/boundary/swingui/monitor/impl/Generic2DDisplay.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@ private void updateHookedNodeView() {
373373
final Node<T> hookedNode = hooked.get();
374374
final P hookedCoordinates = positions.get(hookedNode);
375375
if (hookedCoordinates == null) {
376-
hooked.set(Optional.empty());
376+
hooked = Optional.empty();
377377
return;
378378
}
379379
final Point hookedPoint = wormhole.getViewPoint(hookedCoordinates);

0 commit comments

Comments
 (0)