Author: andreas
Date: Thu Dec 13 09:24:20 2007
New Revision: 603960
URL: http://svn.apache.org/viewvc?rev=603960&view=rev
Log:
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.
Modified:
lenya/trunk/src/modules/svg/java/src/org/apache/lenya/modules/svg/ProtocolHandler.java
Modified: lenya/trunk/src/modules/svg/java/src/org/apache/lenya/modules/svg/ProtocolHandler.java
URL: http://svn.apache.org/viewvc/lenya/trunk/src/modules/svg/java/src/org/apache/lenya/modules/svg/ProtocolHandler.java?rev=603960&r1=603959&r2=603960&view=diff
==============================================================================
--- lenya/trunk/src/modules/svg/java/src/org/apache/lenya/modules/svg/ProtocolHandler.java (original)
+++ lenya/trunk/src/modules/svg/java/src/org/apache/lenya/modules/svg/ProtocolHandler.java Thu Dec 13 09:24:20 2007
@@ -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 {
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.