tomee-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rmannibu...@apache.org
Subject tomee git commit: resource should be used if found + pmd
Date Tue, 30 Dec 2014 17:53:20 GMT
Repository: tomee
Updated Branches:
  refs/heads/tomee-1.7.x 823723f27 -> dcb338f0d


resource should be used if found + pmd


Project: http://git-wip-us.apache.org/repos/asf/tomee/repo
Commit: http://git-wip-us.apache.org/repos/asf/tomee/commit/dcb338f0
Tree: http://git-wip-us.apache.org/repos/asf/tomee/tree/dcb338f0
Diff: http://git-wip-us.apache.org/repos/asf/tomee/diff/dcb338f0

Branch: refs/heads/tomee-1.7.x
Commit: dcb338f0d1ff0f15a8d400af55dc1b0bc754381f
Parents: 823723f
Author: Romain Manni-Bucau <rmannibucau@apache.org>
Authored: Tue Dec 30 18:53:12 2014 +0100
Committer: Romain Manni-Bucau <rmannibucau@apache.org>
Committed: Tue Dec 30 18:53:12 2014 +0100

----------------------------------------------------------------------
 .../org/apache/openejb/testing/ApplicationComposers.java    | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tomee/blob/dcb338f0/container/openejb-core/src/main/java/org/apache/openejb/testing/ApplicationComposers.java
----------------------------------------------------------------------
diff --git a/container/openejb-core/src/main/java/org/apache/openejb/testing/ApplicationComposers.java
b/container/openejb-core/src/main/java/org/apache/openejb/testing/ApplicationComposers.java
index 5ae9594..729bb8a 100644
--- a/container/openejb-core/src/main/java/org/apache/openejb/testing/ApplicationComposers.java
+++ b/container/openejb-core/src/main/java/org/apache/openejb/testing/ApplicationComposers.java
@@ -110,7 +110,6 @@ import java.net.URL;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Collection;
-import java.util.Collections;
 import java.util.HashMap;
 import java.util.LinkedList;
 import java.util.List;
@@ -1075,9 +1074,9 @@ public final class ApplicationComposers {
             final ClassLoader loader = Thread.currentThread().getContextClassLoader();
             if (descriptors instanceof Descriptors) {
                 for (final Descriptor descriptor : ((Descriptors) descriptors).value()) {
-                    URL resource = loader.getResource(descriptor.path());
+                    final URL resource = loader.getResource(descriptor.path());
                     try {
-                        dds.put(descriptor.name(), resource == null ? new File(descriptor.path()).toURI().toURL()
: null);
+                        dds.put(descriptor.name(), resource == null ? new File(descriptor.path()).toURI().toURL()
: resource);
                     } catch (final MalformedURLException e) {
                         throw new IllegalArgumentException(e);
                     }
@@ -1085,9 +1084,9 @@ public final class ApplicationComposers {
             } else {
                 if (descriptors instanceof org.apache.openejb.junit.Descriptors) {
                     for (final org.apache.openejb.junit.Descriptor descriptor : ((org.apache.openejb.junit.Descriptors)
descriptors).value()) {
-                        URL resource = loader.getResource(descriptor.path());
+                        final URL resource = loader.getResource(descriptor.path());
                         try {
-                            dds.put(descriptor.name(), resource == null ? new File(descriptor.path()).toURI().toURL()
: null);
+                            dds.put(descriptor.name(), resource == null ? new File(descriptor.path()).toURI().toURL()
: resource);
                         } catch (final MalformedURLException e) {
                             throw new IllegalArgumentException(e);
                         }


Mime
View raw message