summaryrefslogtreecommitdiffstats
path: root/org.aspectj.matcher
diff options
context:
space:
mode:
authoraclement <aclement>2009-09-03 23:02:17 +0000
committeraclement <aclement>2009-09-03 23:02:17 +0000
commit9c0f19aded36e6ac1778aade1624fce7ead02e9c (patch)
tree2103e29ac6eb5ceb64ca359dfede5b387c93d987 /org.aspectj.matcher
parent853ecde20640984a19aae66c1955509428c178fc (diff)
downloadaspectj-9c0f19aded36e6ac1778aade1624fce7ead02e9c.tar.gz
aspectj-9c0f19aded36e6ac1778aade1624fce7ead02e9c.zip
close streams
Diffstat (limited to 'org.aspectj.matcher')
-rw-r--r--org.aspectj.matcher/src/org/aspectj/weaver/Lint.java12
1 files changed, 11 insertions, 1 deletions
diff --git a/org.aspectj.matcher/src/org/aspectj/weaver/Lint.java b/org.aspectj.matcher/src/org/aspectj/weaver/Lint.java
index bc2b44ba4..111b8a61d 100644
--- a/org.aspectj.matcher/src/org/aspectj/weaver/Lint.java
+++ b/org.aspectj.matcher/src/org/aspectj/weaver/Lint.java
@@ -164,13 +164,23 @@ public class Lint {
public void setFromProperties(File file) {
if (trace.isTraceEnabled())
trace.enter("setFromProperties", this, file);
+ InputStream s = null;
try {
- InputStream s = new FileInputStream(file);
+ s = new FileInputStream(file);
setFromProperties(s);
} catch (IOException ioe) {
MessageUtil.error(world.getMessageHandler(), WeaverMessages.format(WeaverMessages.XLINT_LOAD_ERROR, file.getPath(), ioe
.getMessage()));
+ } finally {
+ if (s != null) {
+ try {
+ s.close();
+ } catch (IOException e) {
+ // ignore
+ }
+ }
}
+
if (trace.isTraceEnabled())
trace.exit("setFromProperties");
}