portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Raphaël Luta <raph...@apache.org>
Subject PortletURLProviderImpl.toString() ?
Date Sun, 10 Apr 2005 15:30:14 GMT
I was looking at J2 source code trying to figure out where to
modify the source code to allow a portal parameter to be considered
as a portlet parameter for all portlets found on the same page when
I encountered the following code in

org.apache.jetspeed.services.information.PortletURLProviderImpl

     public String toString()
     {
         if ( clearParameters )
         {
             if (parameters != null)
             {
                 Iterator names = parameters.keySet().iterator();
                 Map map = new HashMap();
                 while (names.hasNext())
                 {
                     String name = (String) names.next();
                     Object value = parameters.get(name);
                     String[] values = value instanceof String ? new 
String[] {(String) value } : (String[]) value;
                     map.put(name,values);
                 }
             }
             return 
url.createPortletURL(portletWindow,parameters,mode,state,action,secure);
         }
         else
         {
             return url.createPortletURL(portletWindow,mode,state,secure);
         }
     }

This seems clearly wrong to me since we create a new local HashMap (map)
that is never atually used. If someone can clue me in what this code is
supposed to do, I'll fix it.

-- 
Raphaël Luta - raphael@apache.org
Apache Portals - Enterprise Portal in Java
http://portals.apache.org/

---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-dev-help@jakarta.apache.org


Mime
View raw message