ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jon Skeet" <jon.sk...@peramon.com>
Subject RE: cvs commit: jakarta-ant/src/main/org/apache/tools/ant/taskdefs Jar.java
Date Tue, 05 Mar 2002 14:38:15 GMT
> umagesh@apache.org wrote:
> 
> >   -        if (vPath.equalsIgnoreCase("META-INF/MANIFEST.MF"))  {
> >   +        if ("META-INF/MANIFEST.MF".equalsIgnoreCase(vPath))  {
> 
> Magesh,
> 
> I've never understood why people do this in Java. Makes the code less 
> "readable" IMHO. What is the justification?

If vPath is null, you get "false" rather than a NullPointerException.

Note that what *isn't* needed is the nasty:

if (5==i)

which is often encountered in C.

Jon

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