You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by ge...@apache.org on 2006/07/21 18:27:18 UTC

svn commit: r424373 - /incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/java/lang/Class.java

Author: geirm
Date: Fri Jul 21 09:27:16 2006
New Revision: 424373

URL: http://svn.apache.org/viewvc?rev=424373&view=rev
Log:
patch from HARMONY-939 - discovered when running
eclipse 3.2, Class.java was comparing return types
unnecessarily


Modified:
    incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/java/lang/Class.java

Modified: incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/java/lang/Class.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/java/lang/Class.java?rev=424373&r1=424372&r2=424373&view=diff
==============================================================================
--- incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/java/lang/Class.java (original)
+++ incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/java/lang/Class.java Fri Jul 21 09:27:16 2006
@@ -1097,9 +1097,16 @@
                 .toArray(new Method[methods.size()]);
         }
 
+        /**
+         *  Checks if two methods match by name and parameter types.
+         *  Ignored return type
+         *
+         * @param m1 one method to check
+         * @param m2 the other method to check
+         * @return true if they match, false otherwise
+         */
         private boolean isMethodMatches(Method m1, Method m2) {
             return m1.getName().equals(m2.getName())
-                && m1.getReturnType() == m2.getReturnType()
                 && isTypeMatches(m1.getParameterTypes(), m2.getParameterTypes());
         }