From: aclement Date: Fri, 18 Sep 2009 23:05:59 +0000 (+0000) Subject: 289816 X-Git-Tag: V1_6_6~28 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=67ffda8e2f53058f6e41336f5204541e912ca9e2;p=aspectj.git 289816 --- diff --git a/weaver/src/org/aspectj/weaver/bcel/BcelWorld.java b/weaver/src/org/aspectj/weaver/bcel/BcelWorld.java index 4d6d73b33..dade0bbe6 100644 --- a/weaver/src/org/aspectj/weaver/bcel/BcelWorld.java +++ b/weaver/src/org/aspectj/weaver/bcel/BcelWorld.java @@ -390,18 +390,22 @@ public class BcelWorld extends World implements Repository { } } + ClassPathManager.ClassFile file = null; try { - ClassPathManager.ClassFile file = classPath.find(UnresolvedType.forName(name)); + file = classPath.find(UnresolvedType.forName(name)); if (file == null) return null; ClassParser parser = new ClassParser(file.getInputStream(), file.getPath()); JavaClass jc = parser.parse(); - file.close(); return jc; } catch (IOException ioe) { return null; + } finally { + if (file != null) { + file.close(); + } } }