Allon Mureinik has uploaded a new change for review.

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

core: Remove Role ctor only used in tests

Removed the ctor that isn't used anywhere in production code.

Change-Id: I45cace9b2f74eebd59e0e9f3c39aa50abe96d9d5
Signed-off-by: Allon Mureinik <amure...@redhat.com>
---
M 
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/Role.java
M 
backend/manager/modules/utils/src/test/java/org/ovirt/engine/core/utils/serialization/json/JsonObjectSerializationEntitiesTest.java
2 files changed, 10 insertions(+), 9 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/24/18124/1

diff --git 
a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/Role.java
 
b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/Role.java
index 889b937..cfbf19f9 100644
--- 
a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/Role.java
+++ 
b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/Role.java
@@ -33,14 +33,6 @@
     public Role() {
     }
 
-    // TODO add type to the constructor? - depends on future code changes by
-    // Omer
-    public Role(String description, Guid id, String name) {
-        this.description = description;
-        this.id = id;
-        this.name = name;
-    }
-
     @Override
     public int hashCode() {
         final int prime = 31;
diff --git 
a/backend/manager/modules/utils/src/test/java/org/ovirt/engine/core/utils/serialization/json/JsonObjectSerializationEntitiesTest.java
 
b/backend/manager/modules/utils/src/test/java/org/ovirt/engine/core/utils/serialization/json/JsonObjectSerializationEntitiesTest.java
index f4147f7..6e339c1 100644
--- 
a/backend/manager/modules/utils/src/test/java/org/ovirt/engine/core/utils/serialization/json/JsonObjectSerializationEntitiesTest.java
+++ 
b/backend/manager/modules/utils/src/test/java/org/ovirt/engine/core/utils/serialization/json/JsonObjectSerializationEntitiesTest.java
@@ -69,7 +69,7 @@
                         { new StoragePoolIsoMap(Guid.newGuid(),
                                 Guid.newGuid(),
                                 random.nextEnum(StorageDomainStatus.class)) },
-                        { new Role(random.nextString(10), Guid.newGuid(), 
random.nextString(10)) },
+                        { randomRole() },
                         { new IdContainerClass<vds_spm_id_map>(new 
vds_spm_id_map(Guid.newGuid(),
                                 Guid.newGuid(),
                                 random.nextInt())) },
@@ -153,6 +153,15 @@
         return vdsStatistics;
     }
 
+    private static Role randomRole() {
+        RandomUtils random = RandomUtils.instance();
+        Role role = new Role();
+        role.setdescription(random.nextString(10));
+        role.setId(Guid.newGuid());
+        role.setname(random.nextString(10));
+        return role;
+    }
+
     @Test
     public void serializeAndDesrializeEntity() throws Exception {
         String serializedEntity = new JsonObjectSerializer().serialize(entity);


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

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

Reply via email to