join two static init blocks; remove unnecessary checks on method identity (name/args are enough to identify a method)

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/proxy/trunk@1582776 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/core/src/main/java/org/apache/commons/proxy2/ProxyUtils.java b/core/src/main/java/org/apache/commons/proxy2/ProxyUtils.java
index 24b517c..fe9259e 100644
--- a/core/src/main/java/org/apache/commons/proxy2/ProxyUtils.java
+++ b/core/src/main/java/org/apache/commons/proxy2/ProxyUtils.java
@@ -57,10 +57,7 @@
         wrappers.put(Double.TYPE, Double.class);
         wrappers.put(Byte.TYPE, Byte.class);
         WRAPPER_CLASS_MAP = Collections.unmodifiableMap(wrappers);
-    }
 
-    static
-    {
         final Map<Class<?>, Object> nullValues = new HashMap<Class<?>, Object>();
         nullValues.put(Integer.TYPE, Integer.valueOf(0));
         nullValues.put(Long.TYPE, Long.valueOf(0));
@@ -153,12 +150,12 @@
      * 
      * @param method
      *            to compare
-     * @return <code>true</code> for a method with signature <code>boolean equals(Object)</code>
+     * @return <code>true</code> for a method with signature <code>equals(Object)</code>
      */
     public static boolean isEqualsMethod(Method method)
     {
-        return "equals".equals(method.getName()) && Boolean.TYPE.equals(method.getReturnType())
-                && method.getParameterTypes().length == 1 && Object.class.equals(method.getParameterTypes()[0]);
+        return "equals".equals(method.getName()) && method.getParameterTypes().length == 1
+                && Object.class.equals(method.getParameterTypes()[0]);
     }
 
     /**
@@ -166,12 +163,11 @@
      * 
      * @param method
      *            to compare
-     * @return true for a method with signature <code>int hashCode()</code>
+     * @return true for a method with signature <code>hashCode()</code>
      */
     public static boolean isHashCode(Method method)
     {
-        return "hashCode".equals(method.getName()) && Integer.TYPE.equals(method.getReturnType())
-                && method.getParameterTypes().length == 0;
+        return "hashCode".equals(method.getName()) && method.getParameterTypes().length == 0;
     }
 
     /**