Allon Mureinik has uploaded a new change for review.

Change subject: core: Remove BaseDisk ctor only used in tests
......................................................................

core: Remove BaseDisk ctor only used in tests

Removed the ctor that isn't used anywhere in production code.
This in fact also makes the tests easier to understand, as now the test
BaseDisks instances only have the relevant field values and not all
the values demanded by this useless constructor.

Change-Id: I9da209b6fa365e4a4ede7fd4bf61eb83703c6dc1
Signed-off-by: Allon Mureinik <[email protected]>
---
M 
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/BaseDisk.java
M 
backend/manager/modules/dal/src/test/java/org/ovirt/engine/core/dao/BaseDiskDaoTest.java
2 files changed, 8 insertions(+), 28 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/13/18113/1

diff --git 
a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/BaseDisk.java
 
b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/BaseDisk.java
index b482658..e1a4f7e 100644
--- 
a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/BaseDisk.java
+++ 
b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/BaseDisk.java
@@ -82,27 +82,6 @@
     public BaseDisk() {
     }
 
-    public BaseDisk(Guid id,
-            DiskInterface diskInterface,
-            boolean wipeAfterDelete,
-            PropagateErrors propagateErrors,
-            String diskAlias,
-            String diskDescription,
-            boolean shareable,
-            boolean boot,
-            ScsiGenericIO sgio) {
-        super();
-        this.id = id;
-        this.diskInterface = diskInterface;
-        this.wipeAfterDelete = wipeAfterDelete;
-        this.propagateErrors = propagateErrors;
-        this.diskAlias = diskAlias;
-        this.diskDescription = diskDescription;
-        this.shareable = shareable;
-        this.boot = boot;
-        this.sgio = sgio;
-    }
-
     @Override
     public Object getQueryableId() {
         return getId();
diff --git 
a/backend/manager/modules/dal/src/test/java/org/ovirt/engine/core/dao/BaseDiskDaoTest.java
 
b/backend/manager/modules/dal/src/test/java/org/ovirt/engine/core/dao/BaseDiskDaoTest.java
index 3e71838..7d1a3e0 100644
--- 
a/backend/manager/modules/dal/src/test/java/org/ovirt/engine/core/dao/BaseDiskDaoTest.java
+++ 
b/backend/manager/modules/dal/src/test/java/org/ovirt/engine/core/dao/BaseDiskDaoTest.java
@@ -30,13 +30,14 @@
 
     @Override
     protected BaseDisk generateNewEntity() {
-        return new BaseDisk(Guid.newGuid(),
-                DiskInterface.IDE,
-                true,
-                PropagateErrors.Off,
-                "DiskName",
-                "",
-                false, false, ScsiGenericIO.FILTERED);
+        BaseDisk d = new BaseDisk();
+        d.setId(Guid.newGuid());
+        d.setDiskInterface(DiskInterface.IDE);
+        d.setWipeAfterDelete(true);
+        d.setPropagateErrors(PropagateErrors.Off);
+        d.setDiskAlias("DiskName");
+        d.setSgio(ScsiGenericIO.FILTERED);
+        return d;
     }
 
     @Override


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9da209b6fa365e4a4ede7fd4bf61eb83703c6dc1
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Allon Mureinik <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to