summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkitfox2008-04-15 10:21:20 +0200
committerkitfox2008-04-15 10:21:20 +0200
commitcd300f7d31595858e387b09064737b9e90475e5c (patch)
tree7eb372294c36c7a0e2eb2bceabf1ba0cdc8d9ad1
parentNow generating correct svgsalamander-tiny.jar (diff)
downloadsvg-salamander-core-cd300f7d31595858e387b09064737b9e90475e5c.tar.gz
svg-salamander-core-cd300f7d31595858e387b09064737b9e90475e5c.tar.xz
svg-salamander-core-cd300f7d31595858e387b09064737b9e90475e5c.zip
Fixed infinate recursion when calling SVGUniverse.loadSVG()
git-svn-id: https://svn.java.net/svn/svgsalamander~svn/trunk/svg-core@55 7dc7fa77-23fb-e6ad-8e2e-c86bd48ed22b
-rw-r--r--src/main/java/com/kitfox/svg/SVGUniverse.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/main/java/com/kitfox/svg/SVGUniverse.java b/src/main/java/com/kitfox/svg/SVGUniverse.java
index c6b3e58..9ca3126 100644
--- a/src/main/java/com/kitfox/svg/SVGUniverse.java
+++ b/src/main/java/com/kitfox/svg/SVGUniverse.java
@@ -385,7 +385,11 @@ public class SVGUniverse implements Serializable
public URI loadSVG(InputStream is, String name, boolean forceLoad) throws IOException
{
- return loadSVG(createDocumentInputStream(is), name, forceLoad);
+ URI uri = getStreamBuiltURI(name);
+ if (uri == null) return null;
+ if (loadedDocs.containsKey(uri) && !forceLoad) return uri;
+
+ return loadSVG(uri, new InputSource(createDocumentInputStream(is)));
}
public URI loadSVG(Reader reader, String name)