From 1a2eef067f87e9037bd39f20d4c682c642689de8 Mon Sep 17 00:00:00 2001 From: aclement Date: Tue, 17 Oct 2006 14:53:42 +0000 Subject: [PATCH] close files! --- util/src/org/aspectj/util/ConfigParser.java | 1 + weaver/src/org/aspectj/weaver/bcel/BcelWeaver.java | 1 + 2 files changed, 2 insertions(+) diff --git a/util/src/org/aspectj/util/ConfigParser.java b/util/src/org/aspectj/util/ConfigParser.java index fbbc457fa..0ea1bb638 100644 --- a/util/src/org/aspectj/util/ConfigParser.java +++ b/util/src/org/aspectj/util/ConfigParser.java @@ -66,6 +66,7 @@ public class ConfigParser { if (line.length() == 0) continue; args.add(new Arg(line, new SourceLocation(configFile, lineNum))); } + stream.close(); } catch (IOException e) { location = new SourceLocation(configFile, lineNum); showError("error reading config file: " + e.toString()); diff --git a/weaver/src/org/aspectj/weaver/bcel/BcelWeaver.java b/weaver/src/org/aspectj/weaver/bcel/BcelWeaver.java index 38a56ef5b..72626eacd 100644 --- a/weaver/src/org/aspectj/weaver/bcel/BcelWeaver.java +++ b/weaver/src/org/aspectj/weaver/bcel/BcelWeaver.java @@ -270,6 +270,7 @@ public class BcelWeaver implements IWeaver { FileInputStream fis = new FileInputStream(classFiles[i]); byte[] bytes = FileUtil.readAsByteArray(fis); addIfAspect(bytes,classFiles[i].getAbsolutePath(),addedAspects); + fis.close(); } return addedAspects; } -- 2.39.5