cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Peter C. Verhage" <pete...@zeelandnet.nl>
Subject Re: cvs commit: xml-cocoon/webapp/WEB-INF web.xml
Date Tue, 03 Apr 2001 17:24:06 GMT
Giacomo wrote:
: Why are you writing the last statement that way? Would it be better to
write it
: like
:
:      if ("yes".equals(value) == true) {
:
: That way you don't need the additional test against null.

That's true, but, why are you comparing the result of the equals test with
true? Because the equals method returns a boolean. So even more efficiently
would be:

    if ("yes".equals(value)) {

:))

Peter


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Mime
View raw message