prussell 01/02/19 08:58:55
Modified: src/org/apache/cocoon/components/url Tag: xml-cocoon2
URLFactoryImpl.java
Log:
Making getURL(URL,String)LURL behave if handed a null URL base. Now simply
calls getURL(String)LURL rather than throwing an NPE.
Revision Changes Path
No revision
No revision
1.1.2.5 +6 -2
xml-cocoon/src/org/apache/cocoon/components/url/Attic/URLFactoryImpl.java
Index: URLFactoryImpl.java
===================================================================
RCS file:
/home/cvs/xml-cocoon/src/org/apache/cocoon/components/url/Attic/URLFactoryImpl.java,v
retrieving revision 1.1.2.4
retrieving revision 1.1.2.5
diff -u -r1.1.2.4 -r1.1.2.5
--- URLFactoryImpl.java 2001/02/15 12:54:44 1.1.2.4
+++ URLFactoryImpl.java 2001/02/19 16:58:52 1.1.2.5
@@ -29,7 +29,7 @@
/**
* @author <a href="mailto:[EMAIL PROTECTED]">Giacomo Pati</a>
- * @version $Id: URLFactoryImpl.java,v 1.1.2.4 2001/02/15 12:54:44 dims Exp $
+ * @version $Id: URLFactoryImpl.java,v 1.1.2.5 2001/02/19 16:58:52 prussell
Exp $
*/
public class URLFactoryImpl extends AbstractLoggable implements URLFactory,
Component, Configurable, Contextualizable {
@@ -79,7 +79,11 @@
}
public URL getURL(URL base, String location) throws
MalformedURLException {
- return getURL(base.toExternalForm() + location);
+ if ( base != null ) {
+ return getURL(base.toExternalForm() + location);
+ } else {
+ return getURL(location);
+ }
}
/**