Allon Mureinik has uploaded a new change for review.

Change subject: core: rm unused ObjectIdentityChecker methods
......................................................................

core: rm unused ObjectIdentityChecker methods

Change-Id: I3babf37b38921d06ec11c3a7a838edf246ed3f59
Signed-off-by: Allon Mureinik <amure...@redhat.com>
---
M 
backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/ObjectIdentityChecker.java
1 file changed, 0 insertions(+), 30 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/12/22012/1

diff --git 
a/backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/ObjectIdentityChecker.java
 
b/backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/ObjectIdentityChecker.java
index d79a2c6..d1b52b2 100644
--- 
a/backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/ObjectIdentityChecker.java
+++ 
b/backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/ObjectIdentityChecker.java
@@ -7,7 +7,6 @@
 import java.util.Map;
 import java.util.Set;
 
-import org.ovirt.engine.core.common.utils.EnumUtils;
 import org.ovirt.engine.core.common.utils.IObjectDescriptorContainer;
 import org.ovirt.engine.core.compat.backendcompat.PropertyInfo;
 import org.ovirt.engine.core.compat.backendcompat.TypeCompat;
@@ -68,29 +67,6 @@
         return true;
     }
 
-    @SuppressWarnings("unchecked")
-    public static boolean CanUpdateField(String objectType, String fieldName, 
String status) {
-        Class<?> type = aliases.get(objectType);
-        if (type != null) {
-            @SuppressWarnings("rawtypes")
-            final Class statusType = statusTypes.get(type);
-            if (statusType != null) {
-                Enum<?> currentStatus;
-                try {
-                    currentStatus = EnumUtils.valueOf(statusType, status, 
true);
-                } catch (IllegalArgumentException e) {
-                    throw new RuntimeException(String.format("status type %1$s 
not contain type %2$s", statusType,
-                            status));
-                }
-                return CanUpdateField(type, fieldName, currentStatus);
-            } else {
-                throw new RuntimeException(String.format("status type %1$s not 
exist", type));
-            }
-        } else {
-            throw new RuntimeException(String.format("object type %1$s not 
exist", objectType));
-        }
-    }
-
     public final <T extends Enum<T>> void AddField(T status, String fieldName) 
{
         Set<String> values = dictionary.get(status);
         if (values == null) {
@@ -103,12 +79,6 @@
     public final <T extends Enum<T>> void AddField(Iterable<T> statuses, 
String fieldName) {
         for (T status : statuses) {
             AddField(status, fieldName);
-        }
-    }
-
-    public final <T extends Enum<T>> void AddFields(Iterable<T> statuses, 
String... fields) {
-        for (String field : fields) {
-            AddField(statuses, field);
         }
     }
 


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3babf37b38921d06ec11c3a7a838edf246ed3f59
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