aboutsummaryrefslogtreecommitdiff
path: root/src/delombok
diff options
context:
space:
mode:
Diffstat (limited to 'src/delombok')
-rwxr-xr-xsrc/delombok/lombok/delombok/Delombok.java14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/delombok/lombok/delombok/Delombok.java b/src/delombok/lombok/delombok/Delombok.java
index 7318a8ce..a1fd0e56 100755
--- a/src/delombok/lombok/delombok/Delombok.java
+++ b/src/delombok/lombok/delombok/Delombok.java
@@ -354,11 +354,15 @@ public class Delombok {
StringBuilder s = new StringBuilder();
try {
InputStreamReader isr = new InputStreamReader(in, "UTF-8");
- char[] c = new char[4096];
- while (true) {
- int r = isr.read(c);
- if (r == -1) break;
- s.append(c, 0, r);
+ try {
+ char[] c = new char[4096];
+ while (true) {
+ int r = isr.read(c);
+ if (r == -1) break;
+ s.append(c, 0, r);
+ }
+ } finally {
+ isr.close();
}
} finally {
in.close();