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 "whi

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 wrote: > On Mon, Feb 4, 2013 at 4:32 PM, Benedikt Ritter > wrote: > > > ... > > We haven't decided yet how to handle static imports. To form some rules, > > we'd like to hear what othe

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 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. To form som

[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 and

Re: [all] logging practices in Commons components?

2013-02-04 Thread Phil Steitz
On 2/4/13 3:50 AM, Damjan Jovanovic wrote: > Hi > > I see few Commons components do any logging, and net, io and csv don't > even have any dependencies. Is this a recommended practice? There is a lot in the archives on this topic, e.g. [1]. Phil [1] http://markmail.org/message/n3wwfzeosrreni7x >

Re: [all] logging practices in Commons components?

2013-02-04 Thread Gilles
On Mon, 4 Feb 2013 11:58:35 +, sebb wrote: On 4 February 2013 11:50, Damjan Jovanovic wrote: Hi I see few Commons components do any logging, and net, io and csv don't even have any dependencies. Is this a recommended practice? Low level libraries should generally not do any logging; th

[vfs] isWritable issue with HttpFileObject

2013-02-04 Thread Jean-Marc Borer
Hello guys, I am using the VFS api and was rather surprised that when you resolve a HTTP URL, you get a HttpFileObject that always responds "true" to writable instead of "false"... When you ask the FileSystem capabilities it obviously answers false to any write actions. Looking at the code HttpFi

Re: [all] logging practices in Commons components?

2013-02-04 Thread sebb
On 4 February 2013 11:50, Damjan Jovanovic wrote: > Hi > > I see few Commons components do any logging, and net, io and csv don't > even have any dependencies. Is this a recommended practice? Low level libraries should generally not do any logging; the calling application is responsible for this.

Re: [all] logging practices in Commons components?

2013-02-04 Thread Gilles
Hi. I see few Commons components do any logging, and net, io and csv don't even have any dependencies. Is this a recommended practice? It would be a poor recommendation... But it could be the consequence of a "no dependencies" requirement. Imaging prints to System.out (!!) instead of loggin

[all] logging practices in Commons components?

2013-02-04 Thread Damjan Jovanovic
Hi I see few Commons components do any logging, and net, io and csv don't even have any dependencies. Is this a recommended practice? Imaging prints to System.out (!!) instead of logging, and I am wondering if I should add slf4j or log4j2 instead? Regards Damjan

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 imp

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 importe