commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dbros...@apache.org
Subject svn commit: r1819380 - /commons/proper/beanutils/trunk/src/main/java/org/apache/commons/beanutils2/MethodUtils.java
Date Wed, 27 Dec 2017 23:25:40 GMT
Author: dbrosius
Date: Wed Dec 27 23:25:40 2017
New Revision: 1819380

URL: http://svn.apache.org/viewvc?rev=1819380&view=rev
Log:
delay execution of code unless/until needed

Modified:
    commons/proper/beanutils/trunk/src/main/java/org/apache/commons/beanutils2/MethodUtils.java

Modified: commons/proper/beanutils/trunk/src/main/java/org/apache/commons/beanutils2/MethodUtils.java
URL: http://svn.apache.org/viewvc/commons/proper/beanutils/trunk/src/main/java/org/apache/commons/beanutils2/MethodUtils.java?rev=1819380&r1=1819379&r2=1819380&view=diff
==============================================================================
--- commons/proper/beanutils/trunk/src/main/java/org/apache/commons/beanutils2/MethodUtils.java
(original)
+++ commons/proper/beanutils/trunk/src/main/java/org/apache/commons/beanutils2/MethodUtils.java
Wed Dec 27 23:25:40 2017
@@ -787,11 +787,11 @@ public class MethodUtils {
         if (clazz == null) {
             clazz = method.getDeclaringClass();
         } else {
-            sameClass = clazz.equals(method.getDeclaringClass());
             if (!method.getDeclaringClass().isAssignableFrom(clazz)) {
                 throw new IllegalArgumentException(clazz.getName() +
                         " is not assignable from " + method.getDeclaringClass().getName());
             }
+            sameClass = clazz.equals(method.getDeclaringClass());
         }
 
         // If the class is public, we are done



Mime
View raw message