commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gary Gregory <garydgreg...@gmail.com>
Subject 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]
Date Tue, 05 Feb 2013 00:41:35 GMT
On Mon, Feb 4, 2013 at 4:32 PM, Benedikt Ritter <britter@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. To form some rules,
> we'd like to hear what others think about static imports and what rules of
> thumb you use in your projects.
>
> I'm exited to hear your opinions :)
>

I do not use static imports at work. I do not like using them unless it is
for math like expressions (with PI and the like).

Gary


> Regards,
> Benedikt
>
>
> 2013/2/4 Jörg Schaible <Joerg.Schaible@scalaris.com>
>
> > 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 for the same reason.
> >
> > > Also you may have the problem, that you accidentally override
> > > imported static methods, when defining a new static method with the
> same
> > > name. BU2 is a very small code base, so it would be okay for me to
> revert
> > > the change.
> > >
> > > Nevertheless I'd be interested to hear what others thing about this
> > topic.
> >
> > my 2¢
> >
> > - Jörg
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> > For additional commands, e-mail: dev-help@commons.apache.org
> >
> >
>



-- 
E-Mail: garydgregory@gmail.com | ggregory@apache.org
JUnit in Action, 2nd Ed: <http://goog_1249600977>http://bit.ly/ECvg0
Spring Batch in Action: <http://s.apache.org/HOq>http://bit.ly/bqpbCK
Blog: http://garygregory.wordpress.com
Home: http://garygregory.com/
Tweet! http://twitter.com/GaryGregory

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message