summaryrefslogtreecommitdiffstats
path: root/weaver
diff options
context:
space:
mode:
authoraclement <aclement>2009-09-18 23:05:59 +0000
committeraclement <aclement>2009-09-18 23:05:59 +0000
commit67ffda8e2f53058f6e41336f5204541e912ca9e2 (patch)
treec4e105f181d7ca69d65a6126e2e63998294edfd3 /weaver
parent3b522e9db64135ed56ef731142a99136bcded722 (diff)
downloadaspectj-67ffda8e2f53058f6e41336f5204541e912ca9e2.tar.gz
aspectj-67ffda8e2f53058f6e41336f5204541e912ca9e2.zip
289816
Diffstat (limited to 'weaver')
-rw-r--r--weaver/src/org/aspectj/weaver/bcel/BcelWorld.java8
1 files changed, 6 insertions, 2 deletions
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();
+ }
}
}