> -----Original Message----- > From: Conor MacNeill [mailto:[EMAIL PROTECTED] > 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:[EMAIL PROTECTED] > > > > > >>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:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
