ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stephane Bailliez <sbaill...@imediation.com>
Subject RE: cvs commit: jakarta-ant/src/main/org/apache/tools/ant/taskdef s/optional/i18n Translate.java
Date Fri, 25 Jan 2002 16:02:06 GMT
> -----Original Message-----
> From: Erik Hatcher [mailto:jakarta-ant@ehatchersolutions.com]

> ----- Original Message -----
> From: <umagesh@apache.org>
> 
> >   --- Checksum.java 8 Jan 2002 20:14:46 -0000 1.8
> >   +++ Checksum.java 25 Jan 2002 15:05:06 -0000 1.9
> >   @@ -129,55 +129,55 @@
> >        /**
> >         * Sets the file for which the checksum is to be calculated.
> >         */
> >   -    public void setFile(File file) {
> >   -        this.file = file;
> >   +    public void setFile(File aFile) {
> >   +        this.file = aFile;
> >        }
> 
> I'm not fond of this change.... this means that the Javadoc 
> will show the
> parameter as "aFile" rather than "file".
> 
> I understand the rationale to making the method attribute 
> different from the
> member variable, although my style is still to leave them the 
> same.  I think
> the prefixed underscores for private member variables is 
> perhaps a better
> scheme.  Anyway, I think the outward interface and 
> documentation is more
> important than the internal naming conventions.
> 
> Thoughts?

It is not dramatic because it's a bean setter, but the I prefer

public void setFile(File value) {
	file = value;
}

though my preferences goes to the
invalid-becoz-not-following-sun-coding-guidelines:

public void setFile(File file) {
	_file = file;
}

It makes a clear distinction. :)

btw FYI the next version of IDEA codename Ariadna (Ariadne) will make the
distinction between instance, formal parameter and local variable.


Stephane

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