diff options
author | Manoop Talasila <talasila@research.att.com> | 2019-08-13 18:28:59 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2019-08-13 18:28:59 +0000 |
commit | fbb55175562ce56b7168800064521b3b2476d213 (patch) | |
tree | 39ac03f02d8113353cc17ccb64f7dc516fe4d3a0 /ecomp-sdk/epsdk-analytics/src/main | |
parent | 0507ea4cb82985e8bf13cf78f7763e4081ad2d5b (diff) | |
parent | 7198eda75d9f8127a65cc200d0cf402cbde3007e (diff) |
Merge "Fix sonar issues in Line.java"
Diffstat (limited to 'ecomp-sdk/epsdk-analytics/src/main')
-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); |