diff options
author | 2020-05-06 09:13:16 +0530 | |
---|---|---|
committer | 2020-05-06 09:13:24 +0530 | |
commit | 8b593147c3d890685184fd775157ef84f4df112e (patch) | |
tree | 5fa4974e5782c5c81ca822a8ac5efda616532e88 /ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/gmap/map | |
parent | 1ba6611803edc1967be99a4660031635b14149dd (diff) |
code smells removed
code smells removed
Issue-ID: PORTAL-813
Change-Id: Ia2148e9d874162b776147c88860a0366071c4ed2
Signed-off-by: Indrijeet Kumar <indriku1@in.ibm.com>
Diffstat (limited to 'ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/gmap/map')
2 files changed, 5 insertions, 5 deletions
diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/gmap/map/NovaMap.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/gmap/map/NovaMap.java index 90d16649..6473bc6f 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/gmap/map/NovaMap.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/gmap/map/NovaMap.java @@ -140,8 +140,8 @@ public class NovaMap { boundingBox = new Rectangle(); mapArea = new Rectangle2D.Double(); geoArea = new Rectangle2D.Double(); - showList = new HashSet<String>(); - swingLayers = new ArrayList<SwingLayer>(); + showList = new HashSet<>(); + swingLayers = new ArrayList<>(); } public int getBestZoomLevel(double Latitude1, double Longitude1, double Latitude2, double Longitude2, double height, @@ -389,7 +389,7 @@ public class NovaMap { BufferedImage legendImage = null; Graphics2D g2Legend = null; if (showLegend) { - legendImage = new BufferedImage(boundingBox.width, (int) (20 * showListArr.length) + 20, + legendImage = new BufferedImage(boundingBox.width,(20 * showListArr.length) + 20, BufferedImage.TYPE_INT_ARGB); g2Legend = legendImage.createGraphics(); g2Legend.setBackground(Color.WHITE); diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/gmap/map/layer/SwingLayer.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/gmap/map/layer/SwingLayer.java index a9a2fba6..ae6237ca 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/gmap/map/layer/SwingLayer.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/gmap/map/layer/SwingLayer.java @@ -85,7 +85,7 @@ public class SwingLayer { HashMap<String,NodeInfo> hashMap = node.getNodeCollection().getNodeCollection(); Set set = hashMap.entrySet(); int width = map.getShapeWidth(); - ArrayList<String> visibleLabel = new ArrayList<String>(151); + ArrayList<String> visibleLabel = new ArrayList<>(151); Color oldColor = g2d.getColor(); Stroke oldStroke = g2d.getStroke(); int textWidth = 0; @@ -186,7 +186,7 @@ public class SwingLayer { } String legendName = ""; int baseY = 0; - baseY = (int)(20*showListArr.length) + 20;//+5; + baseY = (20*showListArr.length) + 20;//+5; int baseX = 0; if(map.isShowLegend()) { for (int i = showListArr.length-1; i>=0; i--) { |