Re: svn commit: r1441784 - /commons/sandbox/beanutils2/trunk/src/main/java/org/apache/commons/beanutils2/PropertyDescriptorsRegistry.java

2013-02-06 Thread Benedikt Ritter
2013/2/5 Benedikt Ritter brit...@apache.org Hi Simo, 2013/2/5 Simone Tripodi simonetrip...@apache.org Guten Tag, Bene, I personally try to avoid static imports. Especially when you come to a legacy code base IMHO it makes the code harder to understand. as BU2 user, would you write

Re: svn commit: r1441784 - /commons/sandbox/beanutils2/trunk/src/main/java/org/apache/commons/beanutils2/PropertyDescriptorsRegistry.java

2013-02-06 Thread Simone Tripodi
Boolean.valueOf( false ) ) ); // or just valueOf( false )? ;-) or just import static Boolean.FALSE then on( testBean ).invoke( setBooleanProperty ).with( argument( FALSE ) ); which is less verbose and avoids the potential naming conflict. -Simo

Re: svn commit: r1441784 - /commons/sandbox/beanutils2/trunk/src/main/java/org/apache/commons/beanutils2/PropertyDescriptorsRegistry.java

2013-02-06 Thread Benedikt Ritter
2013/2/6 Simone Tripodi simonetrip...@apache.org Boolean.valueOf( false ) ) ); // or just valueOf( false )? ;-) or just import static Boolean.FALSE then on( testBean ).invoke( setBooleanProperty ).with( argument( FALSE ) ); which is less verbose and avoids the potential

Re: svn commit: r1441784 - /commons/sandbox/beanutils2/trunk/src/main/java/org/apache/commons/beanutils2/PropertyDescriptorsRegistry.java

2013-02-06 Thread sebb
On 6 February 2013 11:24, Simone Tripodi simonetrip...@apache.org wrote: Boolean.valueOf( false ) ) ); // or just valueOf( false )? ;-) One should never do that. Just use Boolean.FALSE or just import static Boolean.FALSE then on( testBean ).invoke( setBooleanProperty ).with(

Re: [ALL] How to handle static imports [was: Re: svn commit: r1441784 - /commons/sandbox/beanutils2/trunk/src/main/java/org/apache/commons/beanutils2/PropertyDescriptorsRegistry.java]

2013-02-05 Thread Benedikt Ritter
Hey, thanks for your feedback. It's interesting to see that there seem to be two opposing opinions: Some try to avoid static imports as much as possible, while others use them if it makes the code more fluent. I found the Matt's comment especially useful, for pointing out, that we (as developers

Re: [ALL] How to handle static imports [was: Re: svn commit: r1441784 - /commons/sandbox/beanutils2/trunk/src/main/java/org/apache/commons/beanutils2/PropertyDescriptorsRegistry.java]

2013-02-05 Thread Stephen Colebourne
FYI, the Project Lambda Streams code and JSR-310 in JDK 1.8 are both written with static imports in mind. Moreover, with support for static methods in interfaces being added, this is likely to increase as a pattern. Those facts may or may not affect decisions in commons. Stephen On 4 February

Re: svn commit: r1441784 - /commons/sandbox/beanutils2/trunk/src/main/java/org/apache/commons/beanutils2/PropertyDescriptorsRegistry.java

2013-02-05 Thread Simone Tripodi
Guten Tag, Bene, I personally try to avoid static imports. Especially when you come to a legacy code base IMHO it makes the code harder to understand. as BU2 user, would you write the following sentence on( testBean ).invoke( setBooleanProperty ).with( argument( new Boolean( false ) ) );

Re: svn commit: r1441784 - /commons/sandbox/beanutils2/trunk/src/main/java/org/apache/commons/beanutils2/PropertyDescriptorsRegistry.java

2013-02-05 Thread Benedikt Ritter
Hi Simo, 2013/2/5 Simone Tripodi simonetrip...@apache.org Guten Tag, Bene, I personally try to avoid static imports. Especially when you come to a legacy code base IMHO it makes the code harder to understand. as BU2 user, would you write the following sentence on( testBean

Re: svn commit: r1441784 - /commons/sandbox/beanutils2/trunk/src/main/java/org/apache/commons/beanutils2/PropertyDescriptorsRegistry.java

2013-02-04 Thread Benedikt Ritter
Hi Simo, thanks for sharing your thoughts! I personally try to avoid static imports. Especially when you come to a legacy code base IMHO it makes the code harder to understand. You always have to look, where a method comes from. Also you may have the problem, that you accidentally override

Re: svn commit: r1441784 - /commons/sandbox/beanutils2/trunk/src/main/java/org/apache/commons/beanutils2/PropertyDescriptorsRegistry.java

2013-02-04 Thread Jörg Schaible
Hi, Benedikt Ritter wrote: Hi Simo, thanks for sharing your thoughts! I personally try to avoid static imports. Especially when you come to a legacy code base IMHO it makes the code harder to understand. You always have to look, where a method comes from. Actually I avoid static imports

[ALL] How to handle static imports [was: Re: svn commit: r1441784 - /commons/sandbox/beanutils2/trunk/src/main/java/org/apache/commons/beanutils2/PropertyDescriptorsRegistry.java]

2013-02-04 Thread Benedikt Ritter
Hi, we had a little discussion in BeanUtils2, regarding static imports (see below). To increase visibility and get some more feedback, I'm forwarding this to [ALL] We haven't decided yet how to handle static imports. To form some rules, we'd like to hear what others think about static imports

Re: [ALL] How to handle static imports [was: Re: svn commit: r1441784 - /commons/sandbox/beanutils2/trunk/src/main/java/org/apache/commons/beanutils2/PropertyDescriptorsRegistry.java]

2013-02-04 Thread Gary Gregory
On Mon, Feb 4, 2013 at 4:32 PM, Benedikt Ritter brit...@apache.org wrote: Hi, we had a little discussion in BeanUtils2, regarding static imports (see below). To increase visibility and get some more feedback, I'm forwarding this to [ALL] We haven't decided yet how to handle static imports.

Re: [ALL] How to handle static imports [was: Re: svn commit: r1441784 - /commons/sandbox/beanutils2/trunk/src/main/java/org/apache/commons/beanutils2/PropertyDescriptorsRegistry.java]

2013-02-04 Thread Ted Dunning
Another common use is with junit to import assertEquals and such. On Mon, Feb 4, 2013 at 4:41 PM, Gary Gregory garydgreg...@gmail.com wrote: On Mon, Feb 4, 2013 at 4:32 PM, Benedikt Ritter brit...@apache.org wrote: ... We haven't decided yet how to handle static imports. To form some

Re: [ALL] How to handle static imports [was: Re: svn commit: r1441784 - /commons/sandbox/beanutils2/trunk/src/main/java/org/apache/commons/beanutils2/PropertyDescriptorsRegistry.java]

2013-02-04 Thread Matt Benson
I would say that in general the Commons libraries favor *creating* APIs such that intent reads most fluently by *not* using static imports. I would venture to say that given the examples of when static imports might be desirable, a good rule of thumb wrt *use* of static imports would again be

Re: svn commit: r1441784 - /commons/sandbox/beanutils2/trunk/src/main/java/org/apache/commons/beanutils2/PropertyDescriptorsRegistry.java

2013-02-03 Thread Benedikt Ritter
2013/2/2 Simone Tripodi simonetrip...@apache.org Better make it explicit that getBeanInfo is not a member of PropertyDescriptorsRegistry why Buon giorno Simo, not sure if my last message was delivered. Accidentally used the wrong email address. as I said in the commit message. It is more

Re: svn commit: r1441784 - /commons/sandbox/beanutils2/trunk/src/main/java/org/apache/commons/beanutils2/PropertyDescriptorsRegistry.java

2013-02-02 Thread Simone Tripodi
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/