diff options
author | burdziak <olaf.burdziakowski@nokia.com> | 2019-08-07 14:13:58 +0200 |
---|---|---|
committer | Manoop Talasila <talasila@research.att.com> | 2019-08-13 18:29:04 +0000 |
commit | c80f5775193b81eb7369060fdd18b81094674b53 (patch) | |
tree | 39ac03f02d8113353cc17ccb64f7dc516fe4d3a0 | |
parent | 14ea89a3f2093236abb4dc1ff61122ad27c37ad6 (diff) |
Fix sonar issues in Line.java
Change-Id: Ia1f3df384e82d6e7d9aab02339b6b682f672415c
Issue-ID: PORTAL-523
Signed-off-by: burdziak <olaf.burdziakowski@nokia.com>
(cherry picked from commit 7198eda75d9f8127a65cc200d0cf402cbde3007e)
-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); |