You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by tv...@apache.org on 2013/11/28 13:24:32 UTC

svn commit: r1546356 - in /tomee/tomee/trunk/container/openejb-loader: ./ src/main/config/ src/main/config/pmd/ src/main/java/org/apache/openejb/loader/

Author: tveronezi
Date: Thu Nov 28 12:24:32 2013
New Revision: 1546356

URL: http://svn.apache.org/r1546356
Log:
https://issues.apache.org/jira/browse/OPENEJB-2056

Added:
    tomee/tomee/trunk/container/openejb-loader/src/main/config/
    tomee/tomee/trunk/container/openejb-loader/src/main/config/pmd/
    tomee/tomee/trunk/container/openejb-loader/src/main/config/pmd/openejb-basic.xml
    tomee/tomee/trunk/container/openejb-loader/src/main/config/pmd/openejb-controversial.xml
    tomee/tomee/trunk/container/openejb-loader/src/main/config/pmd/openejb-empty.xml
    tomee/tomee/trunk/container/openejb-loader/src/main/config/pmd/openejb-optimizations.xml
Modified:
    tomee/tomee/trunk/container/openejb-loader/pom.xml
    tomee/tomee/trunk/container/openejb-loader/src/main/java/org/apache/openejb/loader/BasicURLClassPath.java
    tomee/tomee/trunk/container/openejb-loader/src/main/java/org/apache/openejb/loader/Embedder.java
    tomee/tomee/trunk/container/openejb-loader/src/main/java/org/apache/openejb/loader/FileUtils.java
    tomee/tomee/trunk/container/openejb-loader/src/main/java/org/apache/openejb/loader/Loader.java
    tomee/tomee/trunk/container/openejb-loader/src/main/java/org/apache/openejb/loader/Options.java
    tomee/tomee/trunk/container/openejb-loader/src/main/java/org/apache/openejb/loader/ProvisioningUtil.java
    tomee/tomee/trunk/container/openejb-loader/src/main/java/org/apache/openejb/loader/TomcatClassPath.java

Modified: tomee/tomee/trunk/container/openejb-loader/pom.xml
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/container/openejb-loader/pom.xml?rev=1546356&r1=1546355&r2=1546356&view=diff
==============================================================================
--- tomee/tomee/trunk/container/openejb-loader/pom.xml (original)
+++ tomee/tomee/trunk/container/openejb-loader/pom.xml Thu Nov 28 12:24:32 2013
@@ -19,7 +19,8 @@
 
 <!-- $Rev$ $Date$ -->
 
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
   <parent>
     <artifactId>container</artifactId>
     <groupId>org.apache.openejb</groupId>
@@ -30,7 +31,7 @@
   <packaging>jar</packaging>
   <name>OpenEJB :: Container :: Loader</name>
   <properties>
-      <openejb.osgi.import.pkg />
+    <openejb.osgi.import.pkg/>
   </properties>
   <dependencies>
     <dependency>
@@ -39,4 +40,44 @@
       <scope>test</scope>
     </dependency>
   </dependencies>
+  <reporting>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-jxr-plugin</artifactId>
+        <version>2.3</version>
+      </plugin>
+    </plugins>
+  </reporting>
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-pmd-plugin</artifactId>
+        <version>3.0.1</version>
+        <configuration>
+          <linkXRef>true</linkXRef>
+          <sourceEncoding>utf-8</sourceEncoding>
+          <targetJdk>1.6</targetJdk>
+          <rulesets>
+            <ruleset>${project.basedir}/src/main/config/pmd/openejb-empty.xml</ruleset>
+            <ruleset>rulesets/java/finalizers.xml</ruleset>
+            <ruleset>rulesets/java/imports.xml</ruleset>
+            <ruleset>rulesets/java/unusedcode.xml</ruleset>
+            <ruleset>${project.basedir}/src/main/config/pmd/openejb-controversial.xml</ruleset>
+            <ruleset>${project.basedir}/src/main/config/pmd/openejb-basic.xml</ruleset>
+            <ruleset>${project.basedir}/src/main/config/pmd/openejb-optimizations.xml</ruleset>
+          </rulesets>
+        </configuration>
+        <executions>
+          <execution>
+            <phase>compile</phase>
+            <goals>
+              <goal>check</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
 </project>

Added: tomee/tomee/trunk/container/openejb-loader/src/main/config/pmd/openejb-basic.xml
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/container/openejb-loader/src/main/config/pmd/openejb-basic.xml?rev=1546356&view=auto
==============================================================================
--- tomee/tomee/trunk/container/openejb-loader/src/main/config/pmd/openejb-basic.xml (added)
+++ tomee/tomee/trunk/container/openejb-loader/src/main/config/pmd/openejb-basic.xml Thu Nov 28 12:24:32 2013
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+
+-->
+<ruleset name="Basic"
+         xmlns="http://pmd.sourceforge.net/ruleset/2.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://pmd.sourceforge.net/ruleset/2.0.0 http://pmd.sourceforge.net/ruleset_2_0_0.xsd">
+  <description>
+    Custom basic.xml for openejb-core
+  </description>
+
+  <!-- All the rules from basic.xml -->
+  <rule ref="rulesets/java/basic.xml">
+    <exclude name="EmptyCatchBlock"/> <!-- This is covered by the openejb-empty.xml file -->
+    <exclude name="CollapsibleIfStatements"/>
+    <exclude name="ReturnFromFinallyBlock"/>
+    <exclude name="AvoidBranchingStatementAsLastInLoop"/>
+    <exclude name="AvoidThreadGroup"/>
+  </rule>
+
+
+</ruleset>

Added: tomee/tomee/trunk/container/openejb-loader/src/main/config/pmd/openejb-controversial.xml
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/container/openejb-loader/src/main/config/pmd/openejb-controversial.xml?rev=1546356&view=auto
==============================================================================
--- tomee/tomee/trunk/container/openejb-loader/src/main/config/pmd/openejb-controversial.xml (added)
+++ tomee/tomee/trunk/container/openejb-loader/src/main/config/pmd/openejb-controversial.xml Thu Nov 28 12:24:32 2013
@@ -0,0 +1,46 @@
+<?xml version="1.0"?>
+<!--
+
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+-->
+<ruleset name="Basic"
+         xmlns="http://pmd.sourceforge.net/ruleset/2.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://pmd.sourceforge.net/ruleset/2.0.0 http://pmd.sourceforge.net/ruleset_2_0_0.xsd">
+  <description>
+    Custom controversial.xml for openejb-core
+  </description>
+
+  <rule ref="rulesets/java/controversial.xml">
+    <exclude name="DataflowAnomalyAnalysis"/>
+    <exclude name="OnlyOneReturn"/>
+    <exclude name="AvoidFinalLocalVariable"/>
+    <exclude name="NullAssignment"/>
+    <exclude name="AvoidLiteralsInIfCondition"/>
+    <exclude name="AtLeastOneConstructor"/>
+    <exclude name="UseConcurrentHashMap"/>
+    <exclude name="AvoidPrefixingMethodParameters"/>
+    <exclude name="CallSuperInConstructor"/>
+    <exclude name="DefaultPackage"/>
+    <exclude name="AvoidUsingShortType"/>
+    <exclude name="UseObjectForClearerAPI"/>
+    <exclude name="AvoidUsingVolatile"/>
+    <exclude name="AssignmentInOperand"/>
+    <exclude name="BooleanInversion"/>
+  </rule>
+
+</ruleset>

Added: tomee/tomee/trunk/container/openejb-loader/src/main/config/pmd/openejb-empty.xml
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/container/openejb-loader/src/main/config/pmd/openejb-empty.xml?rev=1546356&view=auto
==============================================================================
--- tomee/tomee/trunk/container/openejb-loader/src/main/config/pmd/openejb-empty.xml (added)
+++ tomee/tomee/trunk/container/openejb-loader/src/main/config/pmd/openejb-empty.xml Thu Nov 28 12:24:32 2013
@@ -0,0 +1,40 @@
+<?xml version="1.0"?>
+<!--
+
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+-->
+<ruleset name="Basic"
+         xmlns="http://pmd.sourceforge.net/ruleset/2.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://pmd.sourceforge.net/ruleset/2.0.0 http://pmd.sourceforge.net/ruleset_2_0_0.xsd">
+  <description>
+    Custom empty.xml for openejb-core
+  </description>
+
+  <!-- All the rules from empty.xml -->
+  <rule ref="rulesets/java/empty.xml">
+    <exclude name="EmptyCatchBlock"/>
+  </rule>
+
+  <!-- overriding EmptyCatchBlock -->
+  <rule ref="rulesets/java/empty.xml/EmptyCatchBlock">
+    <properties>
+      <property name="allowCommentedBlocks" value="true"/>
+    </properties>
+  </rule>
+
+</ruleset>

Added: tomee/tomee/trunk/container/openejb-loader/src/main/config/pmd/openejb-optimizations.xml
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/container/openejb-loader/src/main/config/pmd/openejb-optimizations.xml?rev=1546356&view=auto
==============================================================================
--- tomee/tomee/trunk/container/openejb-loader/src/main/config/pmd/openejb-optimizations.xml (added)
+++ tomee/tomee/trunk/container/openejb-loader/src/main/config/pmd/openejb-optimizations.xml Thu Nov 28 12:24:32 2013
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<!--
+
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+-->
+<ruleset name="Basic"
+         xmlns="http://pmd.sourceforge.net/ruleset/2.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://pmd.sourceforge.net/ruleset/2.0.0 http://pmd.sourceforge.net/ruleset_2_0_0.xsd">
+  <description>
+    Custom optimizations.xml for openejb-core
+  </description>
+
+  <!-- All the rules from basic.xml -->
+  <rule ref="rulesets/java/optimizations.xml">
+    <exclude name="PrematureDeclaration"/> <!-- this rule is buggy -->
+    <exclude name="AvoidInstantiatingObjectsInLoops"/>
+    <exclude name="MethodArgumentCouldBeFinal"/>
+    <exclude name="LocalVariableCouldBeFinal"/>
+    <exclude name="RedundantFieldInitializer"/>
+    <exclude name="SimplifyStartsWith"/>
+    <exclude name="UseStringBufferForStringAppends"/>
+    <exclude name="AddEmptyString"/>
+    <exclude name="UseArrayListInsteadOfVector"/>
+  </rule>
+
+</ruleset>

Modified: tomee/tomee/trunk/container/openejb-loader/src/main/java/org/apache/openejb/loader/BasicURLClassPath.java
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/container/openejb-loader/src/main/java/org/apache/openejb/loader/BasicURLClassPath.java?rev=1546356&r1=1546355&r2=1546356&view=diff
==============================================================================
--- tomee/tomee/trunk/container/openejb-loader/src/main/java/org/apache/openejb/loader/BasicURLClassPath.java (original)
+++ tomee/tomee/trunk/container/openejb-loader/src/main/java/org/apache/openejb/loader/BasicURLClassPath.java Thu Nov 28 12:24:32 2013
@@ -27,7 +27,7 @@ import java.security.PrivilegedAction;
 
 public abstract class BasicURLClassPath implements ClassPath {
     public static ClassLoader getContextClassLoader() {
-        return java.security.AccessController.doPrivileged(new java.security.PrivilegedAction<ClassLoader>() {
+        return AccessController.doPrivileged(new PrivilegedAction<ClassLoader>() {
             @Override
             public ClassLoader run() {
                 return Thread.currentThread().getContextClassLoader();
@@ -35,7 +35,7 @@ public abstract class BasicURLClassPath 
         });
     }
 
-    private java.lang.reflect.Field ucpField;
+    private Field ucpField;
 
     protected void addJarToPath(final URL jar, final URLClassLoader loader) throws Exception {
         final Object cp = getURLClassPath(loader);
@@ -96,12 +96,12 @@ public abstract class BasicURLClassPath 
         return getUcpField().get(loader);
     }
 
-    private java.lang.reflect.Field getUcpField() throws Exception {
+    private Field getUcpField() throws Exception {
         if (ucpField == null) {
             ucpField = AccessController.doPrivileged(new PrivilegedAction<Field>() {
                 @Override
                 public Field run() {
-                    java.lang.reflect.Field ucp = null;
+                    Field ucp = null;
                     try {
                         ucp = URLClassLoader.class.getDeclaredField("ucp");
                         ucp.setAccessible(true);

Modified: tomee/tomee/trunk/container/openejb-loader/src/main/java/org/apache/openejb/loader/Embedder.java
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/container/openejb-loader/src/main/java/org/apache/openejb/loader/Embedder.java?rev=1546356&r1=1546355&r2=1546356&view=diff
==============================================================================
--- tomee/tomee/trunk/container/openejb-loader/src/main/java/org/apache/openejb/loader/Embedder.java (original)
+++ tomee/tomee/trunk/container/openejb-loader/src/main/java/org/apache/openejb/loader/Embedder.java Thu Nov 28 12:24:32 2013
@@ -127,8 +127,6 @@ public class Embedder {
         }
     }
 
-    private String NO_HOME = "The openejb.home is not set.";
-
     private String BAD_HOME = "Invalid openejb.home: ";
 
     private String NOT_THERE = "The path specified does not exist.";
@@ -181,13 +179,4 @@ public class Embedder {
         System.err.println("---------------------------------------------------");
         throw new Exception(m1 + " " + m2 + " " + m3);
     }
-
-    private void handleError(String m1, String m2) throws Exception {
-        System.err.println("--[PLEASE FIX]-------------------------------------");
-        System.err.println(m1);
-        System.err.println(m2);
-        System.err.println("---------------------------------------------------");
-        throw new Exception(m1 + " " + m2);
-    }
-
 }

Modified: tomee/tomee/trunk/container/openejb-loader/src/main/java/org/apache/openejb/loader/FileUtils.java
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/container/openejb-loader/src/main/java/org/apache/openejb/loader/FileUtils.java?rev=1546356&r1=1546355&r2=1546356&view=diff
==============================================================================
--- tomee/tomee/trunk/container/openejb-loader/src/main/java/org/apache/openejb/loader/FileUtils.java (original)
+++ tomee/tomee/trunk/container/openejb-loader/src/main/java/org/apache/openejb/loader/FileUtils.java Thu Nov 28 12:24:32 2013
@@ -62,6 +62,7 @@ public class FileUtils {
         return getDirectory(path, false);
     }
 
+    @Override
     public boolean equals(final Object obj) {
         if (!(obj instanceof FileUtils))
             return false;
@@ -69,6 +70,11 @@ public class FileUtils {
         return this.getDirectory().equals(that.getDirectory());
     }
 
+    @Override
+    public int hashCode() {
+        return home != null ? home.hashCode() : 0;
+    }
+
     public File getDirectory(final String path, final boolean create) throws IOException {
         File dir = new File(home, path);
         dir = dir.getCanonicalFile();
@@ -96,11 +102,11 @@ public class FileUtils {
         this.home = dir;
     }
 
-    public File getFile(final String path) throws java.io.FileNotFoundException, java.io.IOException {
+    public File getFile(final String path) throws IOException {
         return getFile(path, true);
     }
 
-    public File getFile(final String path, final boolean validate) throws java.io.FileNotFoundException, java.io.IOException {
+    public File getFile(final String path, final boolean validate) throws IOException {
         File file = new File(path);
 
         if (!file.isAbsolute()) {
@@ -116,20 +122,20 @@ public class FileUtils {
         return file;
     }
 
-    public static File createTempDirectory(final String pathPrefix) throws java.io.IOException {
+    public static File createTempDirectory(final String pathPrefix) throws IOException {
         for (int maxAttempts = 100; maxAttempts > 0; --maxAttempts) {
 
             final String path = pathPrefix + _random.nextLong();
-            final java.io.File tmpDir = new java.io.File(path);
+            final File tmpDir = new File(path);
 
             if (!tmpDir.exists() && tmpDir.mkdirs()) {
                 return tmpDir;
             }
         }
-        throw new java.io.IOException("Cannot create temporary directory at: " + pathPrefix);
+        throw new IOException("Cannot create temporary directory at: " + pathPrefix);
     }
 
-    public static File createTempDirectory() throws java.io.IOException {
+    public static File createTempDirectory() throws IOException {
         final String prefix = System.getProperty("java.io.tmpdir", File.separator + "tmp") + File.separator + "openejb";
         return createTempDirectory(prefix);
     }

Modified: tomee/tomee/trunk/container/openejb-loader/src/main/java/org/apache/openejb/loader/Loader.java
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/container/openejb-loader/src/main/java/org/apache/openejb/loader/Loader.java?rev=1546356&r1=1546355&r2=1546356&view=diff
==============================================================================
--- tomee/tomee/trunk/container/openejb-loader/src/main/java/org/apache/openejb/loader/Loader.java (original)
+++ tomee/tomee/trunk/container/openejb-loader/src/main/java/org/apache/openejb/loader/Loader.java Thu Nov 28 12:24:32 2013
@@ -20,7 +20,7 @@ import java.util.Properties;
 
 public interface Loader {
 
-    public void init(Properties properties) throws Exception;
+    void init(Properties properties) throws Exception;
 
 }
 

Modified: tomee/tomee/trunk/container/openejb-loader/src/main/java/org/apache/openejb/loader/Options.java
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/container/openejb-loader/src/main/java/org/apache/openejb/loader/Options.java?rev=1546356&r1=1546355&r2=1546356&view=diff
==============================================================================
--- tomee/tomee/trunk/container/openejb-loader/src/main/java/org/apache/openejb/loader/Options.java (original)
+++ tomee/tomee/trunk/container/openejb-loader/src/main/java/org/apache/openejb/loader/Options.java Thu Nov 28 12:24:32 2013
@@ -467,24 +467,24 @@ public class Options {
         }
     }
 
-    public static interface Log {
-        public boolean isDebugEnabled();
+    public interface Log {
+        boolean isDebugEnabled();
 
-        public boolean isInfoEnabled();
+        boolean isInfoEnabled();
 
-        public boolean isWarningEnabled();
+        boolean isWarningEnabled();
 
-        public void warning(String message, Throwable t);
+        void warning(String message, Throwable t);
 
-        public void warning(String message);
+        void warning(String message);
 
-        public void debug(String message, Throwable t);
+        void debug(String message, Throwable t);
 
-        public void debug(String message);
+        void debug(String message);
 
-        public void info(String message, Throwable t);
+        void info(String message, Throwable t);
 
-        public void info(String message);
+        void info(String message);
     }
 
     public static class NullLog implements Log {

Modified: tomee/tomee/trunk/container/openejb-loader/src/main/java/org/apache/openejb/loader/ProvisioningUtil.java
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/container/openejb-loader/src/main/java/org/apache/openejb/loader/ProvisioningUtil.java?rev=1546356&r1=1546355&r2=1546356&view=diff
==============================================================================
--- tomee/tomee/trunk/container/openejb-loader/src/main/java/org/apache/openejb/loader/ProvisioningUtil.java (original)
+++ tomee/tomee/trunk/container/openejb-loader/src/main/java/org/apache/openejb/loader/ProvisioningUtil.java Thu Nov 28 12:24:32 2013
@@ -28,7 +28,6 @@ import java.io.ByteArrayOutputStream;
 import java.io.File;
 import java.io.IOException;
 import java.io.InputStream;
-import java.net.InetSocketAddress;
 import java.net.MalformedURLException;
 import java.net.Proxy;
 import java.net.ProxySelector;

Modified: tomee/tomee/trunk/container/openejb-loader/src/main/java/org/apache/openejb/loader/TomcatClassPath.java
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/container/openejb-loader/src/main/java/org/apache/openejb/loader/TomcatClassPath.java?rev=1546356&r1=1546355&r2=1546356&view=diff
==============================================================================
--- tomee/tomee/trunk/container/openejb-loader/src/main/java/org/apache/openejb/loader/TomcatClassPath.java (original)
+++ tomee/tomee/trunk/container/openejb-loader/src/main/java/org/apache/openejb/loader/TomcatClassPath.java Thu Nov 28 12:24:32 2013
@@ -32,8 +32,6 @@ import java.util.jar.JarFile;
 import java.util.logging.Level;
 import java.util.logging.Logger;
 
-import static java.net.URLDecoder.decode;
-
 /*-------------------------------------------------------*/
 /* Tomcat ClassLoader Support */
 /*-------------------------------------------------------*/
@@ -344,10 +342,10 @@ public class TomcatClassPath extends Bas
                     final File file = new File(filename);
                     File file2;
                     try {
-                        file2 = new File(decode(filename, "UTF-8"));
+                        file2 = new File(URLDecoder.decode(filename, "UTF-8"));
                     } catch (Exception e) {
                         //noinspection deprecation
-                        file2 = new File(decode(filename));
+                        file2 = new File(URLDecoder.decode(filename));
                     }
                     if (file.exists() || file2.exists()) {
                         return targetURL(currentUrl, fixedResName);