You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-dev@portals.apache.org by jf...@apache.org on 2004/05/19 00:30:15 UTC

cvs commit: jakarta-jetspeed/src/java/org/apache/jetspeed/portal BasePortletConfig.java

jford       2004/05/18 15:30:15

  Modified:    src/java/org/apache/jetspeed/portal BasePortletConfig.java
  Log:
  Fixed NullPointerException possibility
  
  PR: JS1-474
  
  Revision  Changes    Path
  1.12      +7 -2      jakarta-jetspeed/src/java/org/apache/jetspeed/portal/BasePortletConfig.java
  
  Index: BasePortletConfig.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/portal/BasePortletConfig.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- BasePortletConfig.java	23 Feb 2004 04:05:35 -0000	1.11
  +++ BasePortletConfig.java	18 May 2004 22:30:15 -0000	1.12
  @@ -17,6 +17,7 @@
   package org.apache.jetspeed.portal;
   
   //standard java stuff
  +import java.net.URL;
   import java.util.Hashtable;
   import java.util.Map;
   
  @@ -183,7 +184,11 @@
           //then resolve it relative to the current URL context
           if ( url.indexOf("://") < 0 )
           {
  -            this.url = TurbineServlet.getResource( url ).toString();
  +            URL resource = TurbineServlet.getResource( url );
  +            if(resource != null)
  +            {
  +                this.url = resource.toString();
  +            }
           }
           else
           {
  
  
  

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