summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorParshad Patel <pars.patel@samsung.com>2019-02-08 11:31:48 +0900
committerOren Kleks <orenkle@amdocs.com>2019-02-11 14:29:36 +0000
commit5b3dfb3e55de50686b0a871d0fdc10ac724b9665 (patch)
tree50237ae1a392020f04c7ca7722f61820a318aa69
parent1801b24389baa8e3f7298ff2c41e2512b19c1290 (diff)
Fix critical sonar issues in sdc/catalog-be
Fix Cast one of the operands of this integer division to a "double" issues Issue-ID: SDC-1895 Change-Id: If880270321fed4c4fdc6b1de8db110253fe8d8d8 Signed-off-by: Parshad Patel <pars.patel@samsung.com>
-rw-r--r--catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/CompositionBusinessLogic.java12
1 files changed, 6 insertions, 6 deletions
diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/CompositionBusinessLogic.java b/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/CompositionBusinessLogic.java
index fa39cf0dca..7f17d44f57 100644
--- a/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/CompositionBusinessLogic.java
+++ b/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/CompositionBusinessLogic.java
@@ -93,22 +93,22 @@ public class CompositionBusinessLogic {
double offsetedCanvasPosition;
switch (componentInstance.getOriginType()) {
case CP:
- offsetedCanvasPosition = topLeftCanvasPosition - CompositionBusinessLogic.CP_CANVAS_ELEMENT_SIZE / 2;
+ offsetedCanvasPosition = topLeftCanvasPosition - CompositionBusinessLogic.CP_CANVAS_ELEMENT_SIZE / 2.0;
break;
case VL:
- offsetedCanvasPosition = topLeftCanvasPosition - CompositionBusinessLogic.CP_CANVAS_ELEMENT_SIZE / 2;
+ offsetedCanvasPosition = topLeftCanvasPosition - CompositionBusinessLogic.CP_CANVAS_ELEMENT_SIZE / 2.0;
break;
case VF:
- offsetedCanvasPosition = topLeftCanvasPosition - CompositionBusinessLogic.VFC_CANVAS_ELEMENT_SIZE / 2;
+ offsetedCanvasPosition = topLeftCanvasPosition - CompositionBusinessLogic.VFC_CANVAS_ELEMENT_SIZE / 2.0;
break;
case VFC:
- offsetedCanvasPosition = topLeftCanvasPosition - CompositionBusinessLogic.VFC_CANVAS_ELEMENT_SIZE / 2;
+ offsetedCanvasPosition = topLeftCanvasPosition - CompositionBusinessLogic.VFC_CANVAS_ELEMENT_SIZE / 2.0;
break;
case VFCMT:
- offsetedCanvasPosition = topLeftCanvasPosition - CompositionBusinessLogic.VFC_CANVAS_ELEMENT_SIZE / 2;
+ offsetedCanvasPosition = topLeftCanvasPosition - CompositionBusinessLogic.VFC_CANVAS_ELEMENT_SIZE / 2.0;
break;
default:
- offsetedCanvasPosition = topLeftCanvasPosition - CompositionBusinessLogic.VFC_CANVAS_ELEMENT_SIZE / 2;
+ offsetedCanvasPosition = topLeftCanvasPosition - CompositionBusinessLogic.VFC_CANVAS_ELEMENT_SIZE / 2.0;
break;
}
return String.valueOf(offsetedCanvasPosition);