svn commit: r1422851 - /cocoon/cocoon3/trunk/cocoon-servlet/src/main/java/org/apache/cocoon/servlet/ClasspathURLStreamHandlerFactory.java

[email protected]
Newsgroups gmane.text.xml.cocoon.cvs
Message-ID <[email protected]>
Author: ilgrosso
Date: Mon Dec 17 11:15:35 2012
New Revision: 1422851

URL: http://svn.apache.org/viewvc?rev=1422851&view=rev
Log:
Cleaning up some unreachable paths

Modified:
    cocoon/cocoon3/trunk/cocoon-servlet/src/main/java/org/apache/cocoon/servlet/ClasspathURLStreamHandlerFactory.java

Modified: cocoon/cocoon3/trunk/cocoon-servlet/src/main/java/org/apache/cocoon/servlet/ClasspathURLStreamHandlerFactory.java
URL: http://svn.apache.org/viewvc/cocoon/cocoon3/trunk/cocoon-servlet/src/main/java/org/apache/cocoon/servlet/ClasspathURLStreamHandlerFactory.java?rev=1422851&r1=1422850&r2=1422851&view=diff
==============================================================================
--- cocoon/cocoon3/trunk/cocoon-servlet/src/main/java/org/apache/cocoon/servlet/ClasspathURLStreamHandlerFactory.java (original)
+++ cocoon/cocoon3/trunk/cocoon-servlet/src/main/java/org/apache/cocoon/servlet/ClasspathURLStreamHandlerFactory.java Mon Dec 17 11:15:35 2012
@@ -18,7 +18,6 @@
  */
 package org.apache.cocoon.servlet;
 
-import java.io.FileNotFoundException;
 import java.io.IOException;
 import java.net.URL;
 import java.net.URLConnection;
@@ -45,16 +44,8 @@ public class ClasspathURLStreamHandlerFa
         protected URLConnection openConnection(final URL url)
                 throws IOException {
 
-            final URL webinfClasses = Thread.currentThread().getContextClassLoader().getResource("/");
-            URL resourceUrl = new URL(webinfClasses, "../" + url.getPath());
-
-            if (resourceUrl == null) {
-                resourceUrl = Thread.currentThread().getContextClassLoader().getResource(url.getPath());
-            }
-
-            if (resourceUrl == null) {
-                throw new FileNotFoundException(url.toExternalForm());
-            }
+            final URL webinf = Thread.currentThread().getContextClassLoader().getResource("/");
+            final URL resourceUrl = new URL(webinf, "../" + url.getPath());
 
             return resourceUrl.openConnection();
         }
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.