portals-pluto-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From edalqu...@apache.org
Subject svn commit: r1377089 - in /portals/pluto/branches/pluto-2.0.x: ./ pluto-taglib/src/main/java/org/apache/pluto/tags/PortletURLTag286.java pluto-taglib/src/main/java/org/apache/pluto/tags/ResourceURLTag286.java
Date Fri, 24 Aug 2012 20:33:02 GMT
Author: edalquist
Date: Fri Aug 24 20:33:01 2012
New Revision: 1377089

URL: http://svn.apache.org/viewvc?rev=1377089&view=rev
Log:
PLUTO-619 Fix parsing of escapeXml container runtime option

Modified:
    portals/pluto/branches/pluto-2.0.x/   (props changed)
    portals/pluto/branches/pluto-2.0.x/pluto-taglib/src/main/java/org/apache/pluto/tags/PortletURLTag286.java
    portals/pluto/branches/pluto-2.0.x/pluto-taglib/src/main/java/org/apache/pluto/tags/ResourceURLTag286.java

Propchange: portals/pluto/branches/pluto-2.0.x/
------------------------------------------------------------------------------
  Merged /portals/pluto/trunk:r1377087

Modified: portals/pluto/branches/pluto-2.0.x/pluto-taglib/src/main/java/org/apache/pluto/tags/PortletURLTag286.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/pluto-2.0.x/pluto-taglib/src/main/java/org/apache/pluto/tags/PortletURLTag286.java?rev=1377089&r1=1377088&r2=1377089&view=diff
==============================================================================
--- portals/pluto/branches/pluto-2.0.x/pluto-taglib/src/main/java/org/apache/pluto/tags/PortletURLTag286.java
(original)
+++ portals/pluto/branches/pluto-2.0.x/pluto-taglib/src/main/java/org/apache/pluto/tags/PortletURLTag286.java
Fri Aug 24 20:33:01 2012
@@ -55,10 +55,7 @@ public abstract class PortletURLTag286 e
         	String[] result = containerRuntimeOptions.get(Constants.ESCAPE_XML_RUNTIME_OPTION);
         	if (result != null){
         		if (result.length > 0){
-        			if (result[0].equals(true))
-        				escapeXml = true;
-        			else if (result[0].equals(false))
-        				escapeXml = false;
+        		    escapeXml = Boolean.parseBoolean(result[0]);
         		}
         	}
         }

Modified: portals/pluto/branches/pluto-2.0.x/pluto-taglib/src/main/java/org/apache/pluto/tags/ResourceURLTag286.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/pluto-2.0.x/pluto-taglib/src/main/java/org/apache/pluto/tags/ResourceURLTag286.java?rev=1377089&r1=1377088&r2=1377089&view=diff
==============================================================================
--- portals/pluto/branches/pluto-2.0.x/pluto-taglib/src/main/java/org/apache/pluto/tags/ResourceURLTag286.java
(original)
+++ portals/pluto/branches/pluto-2.0.x/pluto-taglib/src/main/java/org/apache/pluto/tags/ResourceURLTag286.java
Fri Aug 24 20:33:01 2012
@@ -57,22 +57,19 @@ public class ResourceURLTag286 extends B
 	 * @see org.apache.pluto.tags.BaseURLTag#doStartTag()
 	 */
 	@Override
-	public int doStartTag() throws JspException {
-	    PortletConfig portletConfig = 
-            (PortletConfig) pageContext.getRequest().getAttribute(Constants.PORTLET_CONFIG);
-	    
-        Map<String,String[]> containerRuntimeOptions = portletConfig.getContainerRuntimeOptions();
-        if (containerRuntimeOptions != null){
-            String[] result = containerRuntimeOptions.get(Constants.ESCAPE_XML_RUNTIME_OPTION);
-            if (result != null){
-                if (result.length > 0){
-                    if (result[0].equals(true))
-                        escapeXml = true;
-                    else if (result[0].equals(false))
-                        escapeXml = false;
-                }
-            }
-        }
+	public int doStartTag() throws JspException {                
+        
+       PortletConfig portletConfig = 
+           (PortletConfig) pageContext.getRequest().getAttribute(Constants.PORTLET_CONFIG);
+       Map<String,String[]> containerRuntimeOptions = portletConfig.getContainerRuntimeOptions();
+       if (containerRuntimeOptions != null){
+           String[] result = containerRuntimeOptions.get(Constants.ESCAPE_XML_RUNTIME_OPTION);
+           if (result != null){
+               if (result.length > 0){
+                   escapeXml = Boolean.parseBoolean(result[0]);
+               }
+           }
+       }
 		       
         PortletResponse portletResponse = (PortletResponse) pageContext.getRequest()
             .getAttribute(Constants.PORTLET_RESPONSE);



Mime
View raw message