You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pluto-scm@portals.apache.org by ed...@apache.org on 2012/08/24 22:31:38 UTC

svn commit: r1377087 - in /portals/pluto/trunk/pluto-taglib/src/main/java/org/apache/pluto/tags: PortletURLTag286.java ResourceURLTag286.java

Author: edalquist
Date: Fri Aug 24 20:31:37 2012
New Revision: 1377087

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

Modified:
    portals/pluto/trunk/pluto-taglib/src/main/java/org/apache/pluto/tags/PortletURLTag286.java
    portals/pluto/trunk/pluto-taglib/src/main/java/org/apache/pluto/tags/ResourceURLTag286.java

Modified: portals/pluto/trunk/pluto-taglib/src/main/java/org/apache/pluto/tags/PortletURLTag286.java
URL: http://svn.apache.org/viewvc/portals/pluto/trunk/pluto-taglib/src/main/java/org/apache/pluto/tags/PortletURLTag286.java?rev=1377087&r1=1377086&r2=1377087&view=diff
==============================================================================
--- portals/pluto/trunk/pluto-taglib/src/main/java/org/apache/pluto/tags/PortletURLTag286.java (original)
+++ portals/pluto/trunk/pluto-taglib/src/main/java/org/apache/pluto/tags/PortletURLTag286.java Fri Aug 24 20:31:37 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/trunk/pluto-taglib/src/main/java/org/apache/pluto/tags/ResourceURLTag286.java
URL: http://svn.apache.org/viewvc/portals/pluto/trunk/pluto-taglib/src/main/java/org/apache/pluto/tags/ResourceURLTag286.java?rev=1377087&r1=1377086&r2=1377087&view=diff
==============================================================================
--- portals/pluto/trunk/pluto-taglib/src/main/java/org/apache/pluto/tags/ResourceURLTag286.java (original)
+++ portals/pluto/trunk/pluto-taglib/src/main/java/org/apache/pluto/tags/ResourceURLTag286.java Fri Aug 24 20:31:37 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);