aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorReinier Zwitserloot <reinier@zwitserloot.com>2012-06-25 21:26:51 +0200
committerReinier Zwitserloot <reinier@zwitserloot.com>2012-06-25 21:26:51 +0200
commit960761a29877510d6e59945656edb87a912f631d (patch)
tree3e695fcc6ab16d7c48731baca57b9c08fad1c1ef
parent073f325d714e4f9a3c14d723a08d0055ad02f580 (diff)
downloadlombok-960761a29877510d6e59945656edb87a912f631d.tar.gz
lombok-960761a29877510d6e59945656edb87a912f631d.tar.bz2
lombok-960761a29877510d6e59945656edb87a912f631d.zip
fixed some warnings that showed up in 4.2. The warnings werent interesting, though.
-rw-r--r--src/installer/lombok/installer/eclipse/EclipseLocation.java9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/installer/lombok/installer/eclipse/EclipseLocation.java b/src/installer/lombok/installer/eclipse/EclipseLocation.java
index fa770d7d..ebc661b8 100644
--- a/src/installer/lombok/installer/eclipse/EclipseLocation.java
+++ b/src/installer/lombok/installer/eclipse/EclipseLocation.java
@@ -111,9 +111,13 @@ public class EclipseLocation extends IdeLocation {
BufferedReader br = new BufferedReader(new InputStreamReader(fis));
String line;
while ((line = br.readLine()) != null) {
- if (JAVA_AGENT_LINE_MATCHER.matcher(line.trim()).matches()) return true;
+ if (JAVA_AGENT_LINE_MATCHER.matcher(line.trim()).matches()) {
+ br.close();
+ return true;
+ }
}
+ br.close();
return false;
} finally {
fis.close();
@@ -171,8 +175,8 @@ public class EclipseLocation extends IdeLocation {
}
newContents.append(line).append(OS_NEWLINE);
+ br.close();
}
-
} finally {
fis.close();
}
@@ -323,6 +327,7 @@ public class EclipseLocation extends IdeLocation {
}
newContents.append(line).append(OS_NEWLINE);
+ br.close();
}
} finally {
fis.close();