deltaspike-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gpetra...@apache.org
Subject git commit: DELTASPIKE-263 minor improvement
Date Sat, 28 Dec 2013 15:13:44 GMT
Updated Branches:
  refs/heads/master 023de9212 -> bcf5909dc


DELTASPIKE-263 minor improvement


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

Branch: refs/heads/master
Commit: bcf5909dcf9e41dee7c73e9e12bf9d055f5cabf1
Parents: 023de92
Author: gpetracek <gpetracek@apache.org>
Authored: Sat Dec 28 16:07:34 2013 +0100
Committer: gpetracek <gpetracek@apache.org>
Committed: Sat Dec 28 16:10:57 2013 +0100

----------------------------------------------------------------------
 .../core/impl/resourceloader/ClasspathResourceProvider.java   | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/deltaspike/blob/bcf5909d/deltaspike/core/impl/src/main/java/org/apache/deltaspike/core/impl/resourceloader/ClasspathResourceProvider.java
----------------------------------------------------------------------
diff --git a/deltaspike/core/impl/src/main/java/org/apache/deltaspike/core/impl/resourceloader/ClasspathResourceProvider.java
b/deltaspike/core/impl/src/main/java/org/apache/deltaspike/core/impl/resourceloader/ClasspathResourceProvider.java
index 755534d..67f9d81 100644
--- a/deltaspike/core/impl/src/main/java/org/apache/deltaspike/core/impl/resourceloader/ClasspathResourceProvider.java
+++ b/deltaspike/core/impl/src/main/java/org/apache/deltaspike/core/impl/resourceloader/ClasspathResourceProvider.java
@@ -71,11 +71,14 @@ public class ClasspathResourceProvider extends BaseResourceProvider
             {
                 if (firstURL != null)
                 {
-                    if (result != null)
+                    try
                     {
                         result.close();
                     }
-                    is.close();
+                    finally
+                    {
+                        is.close();
+                    }
                     throw new IllegalStateException("multiple files found for '" + name +
                         "' (" + firstURL.toExternalForm() + ", " + url.toExternalForm() +
")");
                 }


Mime
View raw message