]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
trys to get the reference from baseDir + ref path
authorKeiron Liddle <keiron@apache.org>
Thu, 21 Jun 2001 14:21:11 +0000 (14:21 +0000)
committerKeiron Liddle <keiron@apache.org>
Thu, 21 Jun 2001 14:21:11 +0000 (14:21 +0000)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@194304 13f79535-47bb-0310-9956-ffa450edef68

src/org/apache/fop/image/FopImageFactory.java

index dc4678ba1cb2fa4efbbdf43dfa57df524064dc41..95dee42858595e7bde652ffa801d9d3ce7282c11 100644 (file)
@@ -9,6 +9,7 @@ package org.apache.fop.image;
 // Java
 import java.io.IOException;
 import java.io.InputStream;
+import java.io.File;
 import java.net.URL;
 import java.net.MalformedURLException;
 import java.lang.reflect.Constructor;
@@ -48,16 +49,7 @@ public class FopImageFactory {
             // maybe relative
             URL context_url = null;
             try {
-                String baseDir = Configuration.getStringValue("baseDir");
-                context_url = new URL(baseDir); // how to get the context URL ?
-                try {
-                    absoluteURL = new URL(context_url, href);
-                } catch (MalformedURLException e_abs) {
-                    // not found
-                    throw new FopImageException( "Invalid Image URL : " +
-                                                 e_abs.getMessage() + "(base URL " +
-                                                 context_url.toString() + ")");
-                }
+                absoluteURL = new URL(Configuration.getStringValue("baseDir") + absoluteURL.getPath());
             } catch (MalformedURLException e_context) {
                 // pb context url
                 throw new FopImageException(