summaryrefslogtreecommitdiffstats
path: root/ecomp-sdk/epsdk-analytics/src/main/java/org
diff options
context:
space:
mode:
authorSaurabh Kumar26 <sk00552209@techmahindra.com>2018-05-28 12:05:48 +0530
committerSaurabh Kumar26 <sk00552209@techmahindra.com>2018-05-28 12:05:48 +0530
commitd5807f0c12e4818f41c49246b3860c00988854fd (patch)
tree2dec0650b236460de848d2fd6d1d97ec6bd832c5 /ecomp-sdk/epsdk-analytics/src/main/java/org
parent4f1afd26403c688b29c8329be66dcaded951bd54 (diff)
sonar critical for Equality Tests
Use BigDecimal to compare values Sonar Link: https://sonar.onap.org/project/issues?assignees=SaurabhKumar26&id=org.onap.portal.sdk%3Aepsdk-project&open=AV_om8MO-08if2a6ufuL&resolved=false&severities=CRITICAL Location: ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/gmap/map Line No: 151 Change-Id: Ie316f4b331cf39d261e78302785c110b16838344 Issue-ID: PORTAL-292 Signed-off-by: Saurabh Kumar26 <sk00552209@techmahindra.com>
Diffstat (limited to 'ecomp-sdk/epsdk-analytics/src/main/java/org')
-rw-r--r--ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/gmap/map/NovaMap.java5
1 files changed, 3 insertions, 2 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 37f457c8..90d16649 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
@@ -46,6 +46,7 @@ import java.awt.geom.NoninvertibleTransformException;
import java.awt.geom.Point2D;
import java.awt.geom.Rectangle2D;
import java.awt.image.BufferedImage;
+import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.HashSet;
@@ -146,9 +147,9 @@ public class NovaMap {
public int getBestZoomLevel(double Latitude1, double Longitude1, double Latitude2, double Longitude2, double height,
double width) {
- if (height == 0)
+ if (BigDecimal.ZERO.compareTo(BigDecimal.valueOf(height)) == 0)
height = 700;
- if (width == 0)
+ if (BigDecimal.ZERO.compareTo(BigDecimal.valueOf(width)) == 0)
width = 1200;
double lat1 = Math.min(Latitude1, Latitude1);