commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From simonetrip...@apache.org
Subject svn commit: r1234344 - /commons/sandbox/beanutils2/trunk/src/main/java/org/apache/commons/beanutils2/DefaultClassAccessor.java
Date Sat, 21 Jan 2012 15:21:06 GMT
Author: simonetripodi
Date: Sat Jan 21 15:21:05 2012
New Revision: 1234344

URL: http://svn.apache.org/viewvc?rev=1234344&view=rev
Log:
limiting the number of makeAccessible() calls

Modified:
    commons/sandbox/beanutils2/trunk/src/main/java/org/apache/commons/beanutils2/DefaultClassAccessor.java

Modified: commons/sandbox/beanutils2/trunk/src/main/java/org/apache/commons/beanutils2/DefaultClassAccessor.java
URL: http://svn.apache.org/viewvc/commons/sandbox/beanutils2/trunk/src/main/java/org/apache/commons/beanutils2/DefaultClassAccessor.java?rev=1234344&r1=1234343&r2=1234344&view=diff
==============================================================================
--- commons/sandbox/beanutils2/trunk/src/main/java/org/apache/commons/beanutils2/DefaultClassAccessor.java
(original)
+++ commons/sandbox/beanutils2/trunk/src/main/java/org/apache/commons/beanutils2/DefaultClassAccessor.java
Sat Jan 21 15:21:05 2012
@@ -130,8 +130,11 @@ final class DefaultClassAccessor<B>
         // most of the time this works and it's much faster
         try
         {
-            Constructor<B> ctor = beanClass.getConstructor( parameterTypes );
-            return makeAccessible( ctor );
+            Constructor<B> ctor = getAccessibleConstructor( beanClass.getConstructor(
parameterTypes ) );
+            if ( ctor != null )
+            {
+                return ctor;
+            }
         }
         catch ( NoSuchMethodException e )
         {



Mime
View raw message