cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fel...@apache.org
Subject svn commit: r591596 - /cocoon/trunk/blocks/cocoon-xsp/cocoon-xsp-impl/src/main/java/org/apache/cocoon/components/language/markup/xsp/XSPCookieHelper.java
Date Sat, 03 Nov 2007 11:21:13 GMT
Author: felixk
Date: Sat Nov  3 04:21:13 2007
New Revision: 591596

URL: http://svn.apache.org/viewvc?rev=591596&view=rev
Log:
Comparison of String parameter using == or !=

This code compares a java.lang.String parameter for reference equality using the == or !=
operators. Requiring callers to pass only String constants or interned strings to a method
is unnecessarily fragile, and rarely leads to measurable performance gains. Consider using
the equals(Object) method instead.

Modified:
    cocoon/trunk/blocks/cocoon-xsp/cocoon-xsp-impl/src/main/java/org/apache/cocoon/components/language/markup/xsp/XSPCookieHelper.java

Modified: cocoon/trunk/blocks/cocoon-xsp/cocoon-xsp-impl/src/main/java/org/apache/cocoon/components/language/markup/xsp/XSPCookieHelper.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-xsp/cocoon-xsp-impl/src/main/java/org/apache/cocoon/components/language/markup/xsp/XSPCookieHelper.java?rev=591596&r1=591595&r2=591596&view=diff
==============================================================================
--- cocoon/trunk/blocks/cocoon-xsp/cocoon-xsp-impl/src/main/java/org/apache/cocoon/components/language/markup/xsp/XSPCookieHelper.java
(original)
+++ cocoon/trunk/blocks/cocoon-xsp/cocoon-xsp-impl/src/main/java/org/apache/cocoon/components/language/markup/xsp/XSPCookieHelper.java
Sat Nov  3 04:21:13 2007
@@ -93,7 +93,7 @@
         if ((path.trim()).length() > 0)
             cookieToSet.setPath("/");
 
-        if (secure == "true")
+        if (secure.equals("true"))
             cookieToSet.setSecure(true);
         else
             cookieToSet.setSecure(false);



Mime
View raw message