]> source.dussan.org Git - aspectj.git/commitdiff
289818
authoraclement <aclement>
Fri, 18 Sep 2009 23:07:29 +0000 (23:07 +0000)
committeraclement <aclement>
Fri, 18 Sep 2009 23:07:29 +0000 (23:07 +0000)
weaver/src/org/aspectj/weaver/bcel/ExtensibleURLClassLoader.java

index 3ee58a7d648e2c157fe3229f4d5b47f6c049fc10..b96f6074c06abfaadbbf3a17b2384919653d573a 100644 (file)
@@ -69,7 +69,11 @@ public abstract class ExtensibleURLClassLoader extends URLClassLoader {
                byte[] b = null;
                ClassPathManager.ClassFile classFile = classPath.find(UnresolvedType.forName(name));
                if (classFile != null) {
-                       b = FileUtil.readAsByteArray(classFile.getInputStream());
+                       try {
+                               b = FileUtil.readAsByteArray(classFile.getInputStream());
+                       } finally {
+                               classFile.close();
+                       }
                }
                return b;
        }