From 0a7b0febf54501a60bb59d6fe957b775c822af9a Mon Sep 17 00:00:00 2001 From: Pedro Costa Date: Wed, 17 Jan 2024 15:56:26 +0000 Subject: [PATCH] sidescan/SidescanPanel: Code cleanup, remove redudantant assignment. --- .../pt/lsts/neptus/plugins/sidescan/SidescanPanel.java | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/plugins-dev/echosounder/src/java/pt/lsts/neptus/plugins/sidescan/SidescanPanel.java b/plugins-dev/echosounder/src/java/pt/lsts/neptus/plugins/sidescan/SidescanPanel.java index 619dafc265..e51b685fbf 100644 --- a/plugins-dev/echosounder/src/java/pt/lsts/neptus/plugins/sidescan/SidescanPanel.java +++ b/plugins-dev/echosounder/src/java/pt/lsts/neptus/plugins/sidescan/SidescanPanel.java @@ -489,13 +489,11 @@ void updateImage(long currentTime, long lastUpdateTime) { // g2d.drawImage(sidescanLine.image, 0, sidescanLine.ypos, null); } synchronized (lineList) { - SidescanLine sidescanLine; // Must be in synchronized block for (SidescanLine line : lineList) { - sidescanLine = line; - sidescanLine.setYPos(sidescanLine.getYPos() + yref); - if (sidescanLine.getYPos() > image.getHeight()) - removeList.add(sidescanLine); + line.setYPos(line.getYPos() + yref); + if (line.getYPos() > image.getHeight()) + removeList.add(line); } lineList.addAll(list); lineList.removeAll(removeList);