Fixed javadoc comment, set path field in ProtocolHandler to avoid that all images contain the same source, see bug 42385. Thanks to Juergen Ragaller for the hint.

git-svn-id: https://svn.apache.org/repos/asf/lenya/trunk@603960 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/src/modules/svg/java/src/org/apache/lenya/modules/svg/ProtocolHandler.java b/src/modules/svg/java/src/org/apache/lenya/modules/svg/ProtocolHandler.java
index 5d7dc87..0de2567 100644
--- a/src/modules/svg/java/src/org/apache/lenya/modules/svg/ProtocolHandler.java
+++ b/src/modules/svg/java/src/org/apache/lenya/modules/svg/ProtocolHandler.java
@@ -37,6 +37,7 @@
 import org.apache.cocoon.CascadingIOException;
 import org.apache.excalibur.source.Source;
 import org.apache.excalibur.source.SourceResolver;
+import org.apache.lenya.util.Assert;
 
 /**
  * Batik URL protocol handler for protocols which are handled by the SourceResolver.
@@ -72,6 +73,9 @@
 
         public ParsedUrlData(String protocol, SourceResolver resolver, String url) {
             this.url = url;
+            String prefix = protocol + ":";
+            Assert.isTrue("valid URL", url.length() > prefix.length());
+            this.path = url.substring(prefix.length());
             this.protocol = protocol;
             this.resolver = resolver;
             try {
@@ -83,9 +87,7 @@
         }
 
         /**
-         * Open a stream for the data. If the thread-local
-         * <code>SourceResolver</code> exists, then use it, otherwise fall
-         * back to <code>SourceHandler</code>.
+         * Open a stream for the data.
          */
         protected InputStream openStreamInternal(String userAgent, Iterator mimeTypes,
                 Iterator encodingTypes) throws IOException {