Hi. I'll butt in with why I would support Marc on this. Marc may well
have different reasons.
The main one is: "What package is class Foo in?" If the class is never
mentioned by it fully qualified name anywhere in the file then you have
to check each of the wildcard imports. This isn't a problem if you have
one or two and they are very different, e.g. javax.ejb.* and
javax.swing.*, but in general this becomes a PITA to read.
Also, it can become confusing when different packages contain classes
that have the same unqualified name. If you use explicit imports then it
is clear which one you mean.
This brings up a topic I've been intending to ask the list about. Are
there coding standards for JBoss? I've been using the templates in
src/etc (which are out of date, BTW, re: [jJ]Boss and [L]GPL) along with
what appears to be the predominant indenting style (which I think of as
"Rickard style"), which seems to be:
- indents are 3 spaces
- braces go on a new line at the same indent level as the previous line
- otherwise standard Java style as from Sun.
I'm not hugely fussed about the exact number of spaces an indent is, but
I am fussed about making things consistent, at the very least within
each file. I also *despise* tab characters - there is a lot of code in
JBoss that just can't be read without adjusting the size of a tab
character to something other than 8 - this is simply nonsense.</foam>
Regards,
Toby.
Jason Dillon wrote:
>
> Any reason for this? I used to import everything by hand, but it became a
> little hard to maintain when packages and classes were renamed. Should I
> resubmit my patch with explicit imports?
>
> Have you had time to look it over? I haven't really heard anything about
> it, nor have I seen any of the changes added to cvs.
>
> --jason
>
> On Fri, 8 Dec 2000, marc fleury wrote:
>
> > |import java.lang.reflect.*;
> > |import javax.naming.*;
> > |import javax.ejb.*;
> >
> > do not use wild card imports
> >
> > marc
> >
> >
--
Toby Allsopp
Research
Peace Software International Ltd
Ph +64-9-3730400