cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anto...@apache.org
Subject svn commit: r124718 - /cocoon/branches/BRANCH_2_1_X/src/blocks/xsp/java/org/apache/cocoon/components/language/markup/xsp/XSPCookieHelper.java
Date Sun, 09 Jan 2005 07:42:12 GMT
Author: antonio
Date: Sat Jan  8 23:42:10 2005
New Revision: 124718

URL: http://svn.apache.org/viewcvs?view=rev&rev=124718
Log:
use BooleanUtils
Modified:
   cocoon/branches/BRANCH_2_1_X/src/blocks/xsp/java/org/apache/cocoon/components/language/markup/xsp/XSPCookieHelper.java

Modified: cocoon/branches/BRANCH_2_1_X/src/blocks/xsp/java/org/apache/cocoon/components/language/markup/xsp/XSPCookieHelper.java
Url: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/blocks/xsp/java/org/apache/cocoon/components/language/markup/xsp/XSPCookieHelper.java?view=diff&rev=124718&p1=cocoon/branches/BRANCH_2_1_X/src/blocks/xsp/java/org/apache/cocoon/components/language/markup/xsp/XSPCookieHelper.java&r1=124717&p2=cocoon/branches/BRANCH_2_1_X/src/blocks/xsp/java/org/apache/cocoon/components/language/markup/xsp/XSPCookieHelper.java&r2=124718
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/xsp/java/org/apache/cocoon/components/language/markup/xsp/XSPCookieHelper.java
(original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/xsp/java/org/apache/cocoon/components/language/markup/xsp/XSPCookieHelper.java
Sat Jan  8 23:42:10 2005
@@ -20,6 +20,7 @@
 import org.apache.cocoon.environment.ObjectModelHelper;
 import org.apache.cocoon.environment.Request;
 import org.apache.cocoon.environment.Response;
+import org.apache.commons.lang.BooleanUtils;
 import org.xml.sax.ContentHandler;
 import org.xml.sax.SAXException;
 
@@ -52,7 +53,7 @@
  * private static String returnCookieProperty(Map ,String ,int ,String );
  * </pre>
  *
- * @version CVS $Id: XSPCookieHelper.java,v 1.1 2004/03/10 12:58:05 stephan Exp $
+ * @version CVS $Id$
  */
 public class XSPCookieHelper extends XSPObjectHelper {
     /**
@@ -93,11 +94,7 @@
         if ((path.trim()).length() > 0)
             cookieToSet.setPath("/");
 
-        if (secure == "true")
-            cookieToSet.setSecure(true);
-        else
-            cookieToSet.setSecure(false);
-
+        cookieToSet.setSecure(BooleanUtils.toBoolean(secure));
         cookieToSet.setVersion(version);
         response.addCookie(cookieToSet);
     }

Mime
View raw message