diff options
author | burdziak <olaf.burdziakowski@nokia.com> | 2019-08-07 14:13:58 +0200 |
---|---|---|
committer | burdziak <olaf.burdziakowski@nokia.com> | 2019-08-07 14:13:58 +0200 |
commit | 7198eda75d9f8127a65cc200d0cf402cbde3007e (patch) | |
tree | 67c8ced81ecb68125840417cc9a16394b93868fe /ecomp-sdk | |
parent | 8b1abe6b2267047d26e0e6cee1c8c086dae95663 (diff) |
Fix sonar issues in Line.java
Change-Id: Ia1f3df384e82d6e7d9aab02339b6b682f672415c
Issue-ID: PORTAL-523
Signed-off-by: burdziak <olaf.burdziakowski@nokia.com>
Diffstat (limited to 'ecomp-sdk')
-rw-r--r-- | ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/gmap/line/Line.java | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/gmap/line/Line.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/gmap/line/Line.java index 6e17ed3d..f3b0cd85 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/gmap/line/Line.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/gmap/line/Line.java @@ -47,20 +47,14 @@ import org.onap.portalsdk.analytics.gmap.map.NovaMap; public class Line { private NovaMap map; private LineCollection lineCollection; - private ArrayList<String> selectionList; - private Set<String> lineIDSet; public Line(NovaMap map) { this.map = map; lineCollection = new LineCollection(); - lineIDSet = new HashSet<String>(); - selectionList = new ArrayList<String>(); } public ArrayList<LineInfo> lineExist(Point2D screenPoint) { ArrayList<LineInfo> existLineInfo = null; - String selectedLine = null; - String selectedType = null; int nearest = -1; int nodeSize = map.getShapeWidth(); nodeSize = nodeSize > 20 ? 20 : nodeSize; @@ -82,17 +76,13 @@ public class Line { diff < (Math.abs(y1 - y2) + Math.abs(x1 - x2)) * (int) (nodeSize * .2)) { if (nearest == -1) { nearest = diff; - selectedLine = lineInfo.getLineID(); - selectedType = lineInfo.getLineType(); } else if (diff <= nearest) { nearest = diff; - selectedLine = lineInfo.getLineID(); - selectedType = lineInfo.getLineType(); } if (existLineInfo == null) { - existLineInfo = new ArrayList<LineInfo>(); + existLineInfo = new ArrayList<>(); } existLineInfo.add(lineInfo); |