You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by br...@apache.org on 2013/02/02 19:17:48 UTC
svn commit: r1441784 -
/commons/sandbox/beanutils2/trunk/src/main/java/org/apache/commons/beanutils2/PropertyDescriptorsRegistry.java
Author: britter
Date: Sat Feb 2 18:17:48 2013
New Revision: 1441784
URL: http://svn.apache.org/viewvc?rev=1441784&view=rev
Log:
Better make it explicit that getBeanInfo is not a member of PropertyDescriptorsRegistry
Modified:
commons/sandbox/beanutils2/trunk/src/main/java/org/apache/commons/beanutils2/PropertyDescriptorsRegistry.java
Modified: commons/sandbox/beanutils2/trunk/src/main/java/org/apache/commons/beanutils2/PropertyDescriptorsRegistry.java
URL: http://svn.apache.org/viewvc/commons/sandbox/beanutils2/trunk/src/main/java/org/apache/commons/beanutils2/PropertyDescriptorsRegistry.java?rev=1441784&r1=1441783&r2=1441784&view=diff
==============================================================================
--- commons/sandbox/beanutils2/trunk/src/main/java/org/apache/commons/beanutils2/PropertyDescriptorsRegistry.java (original)
+++ commons/sandbox/beanutils2/trunk/src/main/java/org/apache/commons/beanutils2/PropertyDescriptorsRegistry.java Sat Feb 2 18:17:48 2013
@@ -19,11 +19,10 @@ package org.apache.commons.beanutils2;
* under the License.
*/
-import static java.beans.Introspector.getBeanInfo;
-
import java.beans.BeanInfo;
import java.beans.IndexedPropertyDescriptor;
import java.beans.IntrospectionException;
+import java.beans.Introspector;
import java.beans.PropertyDescriptor;
import java.lang.reflect.Method;
import java.util.ArrayList;
@@ -76,7 +75,7 @@ final class PropertyDescriptorsRegistry
}
propertiesIndex = new HashMap<String, PropertyDescriptor>();
- BeanInfo beanInfo = getBeanInfo( beanType );
+ BeanInfo beanInfo = Introspector.getBeanInfo( beanType );
List<PropertyDescriptor> propertyDescriptors =
new ArrayList<PropertyDescriptor>( Arrays.asList( beanInfo.getPropertyDescriptors() ) );
Re: svn commit: r1441784 - /commons/sandbox/beanutils2/trunk/src/main/java/org/apache/commons/beanutils2/PropertyDescriptorsRegistry.java
Posted by Simone Tripodi <si...@apache.org>.
Guten Morgen Bene,
where you see the 'explicit', I personally see 'unneeded'. Same for
`Arrays.asList`, just use `asList`, more elegant and more fluent.
my 2 cents,
-Simo
http://people.apache.org/~simonetripodi/
http://simonetripodi.livejournal.com/
http://twitter.com/simonetripodi
http://www.99soft.org/
On Sun, Feb 3, 2013 at 9:34 AM, Benedikt Ritter <be...@gmail.com> wrote:
> 2013/2/2 Simone Tripodi <si...@apache.org>
>
>> > Better make it explicit that getBeanInfo is not a member of
>> PropertyDescriptorsRegistry
>>
>> why
>>
>
> Buon <http://browse.dict.cc/italienisch-deutsch/Buon.html>
> giorno<http://browse.dict.cc/italienisch-deutsch/giorno%21.html>
> Simo,
>
> as I said in the commit message. It is more explicit. What benefit do you
> see from using a static import in that particular place?
>
> Benedikt
>
>
>>
>> http://people.apache.org/~simonetripodi/
>> http://simonetripodi.livejournal.com/
>> http://twitter.com/simonetripodi
>> http://www.99soft.org/
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>> For additional commands, e-mail: dev-help@commons.apache.org
>>
>>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org
Re: svn commit: r1441784 - /commons/sandbox/beanutils2/trunk/src/main/java/org/apache/commons/beanutils2/PropertyDescriptorsRegistry.java
Posted by Benedikt Ritter <be...@gmail.com>.
2013/2/2 Simone Tripodi <si...@apache.org>
> > Better make it explicit that getBeanInfo is not a member of
> PropertyDescriptorsRegistry
>
> why
>
Buon <http://browse.dict.cc/italienisch-deutsch/Buon.html>
giorno<http://browse.dict.cc/italienisch-deutsch/giorno%21.html>
Simo,
as I said in the commit message. It is more explicit. What benefit do you
see from using a static import in that particular place?
Benedikt
>
> http://people.apache.org/~simonetripodi/
> http://simonetripodi.livejournal.com/
> http://twitter.com/simonetripodi
> http://www.99soft.org/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>
>
Re: svn commit: r1441784 - /commons/sandbox/beanutils2/trunk/src/main/java/org/apache/commons/beanutils2/PropertyDescriptorsRegistry.java
Posted by Simone Tripodi <si...@apache.org>.
> Better make it explicit that getBeanInfo is not a member of PropertyDescriptorsRegistry
why
http://people.apache.org/~simonetripodi/
http://simonetripodi.livejournal.com/
http://twitter.com/simonetripodi
http://www.99soft.org/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org