Laszlo Hornyak has uploaded a new change for review.

Change subject: engine: removed redundant BigDecimal instantiations
......................................................................

engine: removed redundant BigDecimal instantiations

Since BigDecimal is immutable, new BigDecimal(0) can be replaced bu
BigDecimal.ZERO

Change-Id: I416da2e5a87cc9a4cec4a762d5da74bddb201298
Signed-off-by: Laszlo Hornyak <lhorn...@redhat.com>
---
M 
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VdsStatistics.java
1 file changed, 4 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/68/13368/1

diff --git 
a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VdsStatistics.java
 
b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VdsStatistics.java
index 5333357..f9ba5bc 100644
--- 
a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VdsStatistics.java
+++ 
b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VdsStatistics.java
@@ -25,10 +25,10 @@
     private Boolean ksm_state;
 
     public VdsStatistics() {
-        this.cpu_idle = new BigDecimal(0);
-        this.cpu_load = new BigDecimal(0);
-        this.cpu_sys = new BigDecimal(0);
-        this.cpu_user = new BigDecimal(0);
+        this.cpu_idle = BigDecimal.ZERO;
+        this.cpu_load = BigDecimal.ZERO;
+        this.cpu_sys = BigDecimal.ZERO;
+        this.cpu_user = BigDecimal.ZERO;
     }
 
     public VdsStatistics(Double cpu_idle, Double cpu_load, Double cpu_sys,


--
To view, visit http://gerrit.ovirt.org/13368
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I416da2e5a87cc9a4cec4a762d5da74bddb201298
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Laszlo Hornyak <lhorn...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to