You are viewing a plain text version of this content. The canonical link for it is here.
Posted to wsrp4j-dev@portals.apache.org by Terry Mueller <te...@permeance.com.au> on 2007/02/22 08:05:18 UTC

Compile error in TemplateProcessor with J2SE 1.4

I was getting the following compile error with J2SE 1.4 against trunk  
(https://svn.apache.org/repos/asf/portals/wsrp4j/trunk):

[INFO] Compilation failure

C:\wsrp4j\consumer-proxyportlet\src\java\org\apache\wsrp4j\consumer\proxyportlet\template\TemplateProcessor.java:[70,27] cannot resolve  
symbol
symbol  : method parseBoolean (java.lang.String)
location: class java.lang.Boolean

C:\wsrp4j\consumer-proxyportlet\src\java\org\apache\wsrp4j\consumer\proxyportlet\template\TemplateProcessor.java:[82,27] cannot resolve  
symbol
symbol  : method parseBoolean (java.lang.String)
location: class java.lang.Boolean

Boolean.parseBoolean(String) needs to be  
Boolean.valueOf(String).booleanValue() to work with J2SE 1.4. I have  
attached the patch.

Regards,
Terry


Re: Compile error in TemplateProcessor with J2SE 1.4

Posted by Diego Louzán <dl...@apache.org>.
Terry Mueller escribió:
> I was getting the following compile error with J2SE 1.4 against trunk
> (https://svn.apache.org/repos/asf/portals/wsrp4j/trunk):
> 
> [INFO] Compilation failure
> 
> C:\wsrp4j\consumer-proxyportlet\src\java\org\apache\wsrp4j\consumer\proxyportlet\template\TemplateProcessor.java:[70,27]
> cannot resolve symbol
> symbol  : method parseBoolean (java.lang.String)
> location: class java.lang.Boolean
> 
> C:\wsrp4j\consumer-proxyportlet\src\java\org\apache\wsrp4j\consumer\proxyportlet\template\TemplateProcessor.java:[82,27]
> cannot resolve symbol
> symbol  : method parseBoolean (java.lang.String)
> location: class java.lang.Boolean
> 
> Boolean.parseBoolean(String) needs to be
> Boolean.valueOf(String).booleanValue() to work with J2SE 1.4. I have
> attached the patch.
> 
> Regards,
> Terry
> 
> 
> ------------------------------------------------------------------------
> 
> Index: TemplateProcessor.java
> ===================================================================
> --- TemplateProcessor.java	(revision 510418)
> +++ TemplateProcessor.java	(working copy)
> @@ -67,7 +67,7 @@
>          String interactionState = request.getParameter(TemplateConstants.TP_INTERACTION_STATE) == null ?
>              "" : request.getParameter(TemplateConstants.TP_INTERACTION_STATE);
>          boolean secureURL = request.getParameter(TemplateConstants.TP_SECURE_URL) == null ?
> -            false : Boolean.parseBoolean(request.getParameter(TemplateConstants.TP_SECURE_URL));
> +            false : Boolean.valueOf(request.getParameter(TemplateConstants.TP_SECURE_URL)).booleanValue();
>          String fragmentId = request.getParameter(TemplateConstants.TP_FRAGMENT_ID) == null ?
>              "" : request.getParameter(TemplateConstants.TP_FRAGMENT_ID);
>          String portletHandle = request.getParameter(TemplateConstants.TP_PORTLET_HANDLE) == null ?
> @@ -79,7 +79,7 @@
>          String sessionId = request.getParameter(TemplateConstants.TP_SESSION_ID) == null ?
>              "" : request.getParameter(TemplateConstants.TP_SESSION_ID);
>          boolean requiresRewrite = request.getParameter(TemplateConstants.TP_REWRITE_RESOURCE) == null ?
> -            false : Boolean.parseBoolean(request.getParameter(TemplateConstants.TP_REWRITE_RESOURCE));
> +            false : Boolean.valueOf(request.getParameter(TemplateConstants.TP_REWRITE_RESOURCE)).booleanValue();
>          
>          /* Parse all the other params and add them to the formParams map */
>          Map formParams = new Hashtable();

Corrected, thanks for the patch.

Regards.
Diego.