diff options
author | kitfox | 2008-04-15 10:21:20 +0200 |
---|---|---|
committer | kitfox | 2008-04-15 10:21:20 +0200 |
commit | cd300f7d31595858e387b09064737b9e90475e5c (patch) | |
tree | 7eb372294c36c7a0e2eb2bceabf1ba0cdc8d9ad1 | |
parent | Now generating correct svgsalamander-tiny.jar (diff) | |
download | svg-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.java | 6 |
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)
|