[utilities COMMIT] /java-support/trunk/src/main/java/net/shibboleth/utilities/java/support/primitive/ObjectSupport.java

noreply at shibboleth.net noreply at shibboleth.net
Wed Dec 28 15:57:59 GMT 2011


Author: lajoie
Date: Wed Dec 28 15:57:59 2011
New Revision: 181

URL: http://svn.shibboleth.net/view/utilities?rev=181&view=rev
Log:
Remove another helper method that can be provided by guava

Modified:
    java-support/trunk/src/main/java/net/shibboleth/utilities/java/support/primitive/ObjectSupport.java

Modified: java-support/trunk/src/main/java/net/shibboleth/utilities/java/support/primitive/ObjectSupport.java
URL: http://svn.shibboleth.net/view/utilities/java-support/trunk/src/main/java/net/shibboleth/utilities/java/support/primitive/ObjectSupport.java?rev=181&r1=180&r2=181&view=diff
==============================================================================
--- java-support/trunk/src/main/java/net/shibboleth/utilities/java/support/primitive/ObjectSupport.java (original)
+++ java-support/trunk/src/main/java/net/shibboleth/utilities/java/support/primitive/ObjectSupport.java Wed Dec 28 15:57:59 2011
@@ -17,7 +17,6 @@
 
 package net.shibboleth.utilities.java.support.primitive;
 
-import com.google.common.base.Objects;
 
 /** Helper methods for working with Objects. */
 public final class ObjectSupport {
@@ -41,27 +40,4 @@
 
         return o.hashCode();
     }
-
-    // submitted as REF 845 for google quava
-    /**
-     * Null-safe check to determine if the given object is equal to any of a list of objects.
-     * 
-     * @param o1 object to check if it's equal to any object in a list
-     * @param objects list of objects
-     * 
-     * @return true of the given object is equal to any object in the given list
-     */
-    public static boolean equalsAny(final Object o1, final Object... objects) {
-        if (o1 == null || objects == null) {
-            return o1 == objects;
-        }
-
-        for (Object object : objects) {
-            if (Objects.equal(o1, object)) {
-                return true;
-            }
-        }
-
-        return false;
-    }
 }



More information about the commits mailing list