ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Adam Murdoch" <adammurdoch...@yahoo.com>
Subject RE: [AUDIT] jakarta-ant/proposal/myrmidon
Date Wed, 06 Feb 2002 08:48:09 GMT


> -----Original Message-----
> From: Conor MacNeill [mailto:conor@cortexebusiness.com.au]
> Sent: Wednesday, 6 February 2002 6:27 PM
> To: Ant Developers List
> Subject: Re: [AUDIT] jakarta-ant/proposal/myrmidon
>
>
> Tim Vernum wrote:
>
> > From: Adam Murdoch [mailto:adammurdoch_ml@yahoo.com]
> >
> >
> >>As far as I can tell, according to the sections
> >>of the JLS that they cite, it's the audit tool that's got the
> >>modifiers in
> >>the wrong order, not our code.
> >>
> >
> > The javadoc for java.lang.reflect.Field#toString() says:
> >
> > <BLOCKQUOTE>
> > The modifiers are placed in canonical order as specified by
> > "The Java Language Specification". This is public, protected
> > or private first, and then other modifiers in the following
> > order: static, final, transient, volatile
> > <BLOCKQUOTE>
> >
> > The audit tool is complaining
> >
> http://icarus.apache.org/~sbailliez/jakarta-ant/proposal/myrmidon/
audit/org/apache/aut/vfs/FileType.html
> >
> > about the following line:
> >     public static final FileType FOLDER = new FileType(
> REZ.getString( "folder.name" ) );
> >
>
>
> I don't think that is what it is complaining about or it would have
> flagged this line in the same file
>   private final static Resources REZ =
>          ResourceManager.getPackageResources( FileType.class );
>

That's the problem - it's got static and final backwards.  As far as I can
tell, according the the JLS, the "private final static" modifiers on this
REZ field are not in the "customary" order.  So it *should* be grizzling
about this one, but isn't.


> I'd say it is complaining about the placement of fields after methods.
> See section 3.1.3 of the Sun coding conventions.
>

Ah, that needs some tidying up.  However, the audit tool's giving the same
violation in other files where all the fields are before the methods.


Adam


--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message