diff options
-rw-r--r-- | anttasks/src/com/android/ant/DependencyGraph.java | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/anttasks/src/com/android/ant/DependencyGraph.java b/anttasks/src/com/android/ant/DependencyGraph.java index 8671359..ef059b9 100644 --- a/anttasks/src/com/android/ant/DependencyGraph.java +++ b/anttasks/src/com/android/ant/DependencyGraph.java @@ -436,13 +436,17 @@ public class DependencyGraph { if (fStream != null) { BufferedReader reader = new BufferedReader(new InputStreamReader(fStream)); - String line; - StringBuilder total = new StringBuilder(reader.readLine()); - while ((line = reader.readLine()) != null) { - total.append('\n'); - total.append(line); + try { + String line; + StringBuilder total = new StringBuilder(reader.readLine()); + while ((line = reader.readLine()) != null) { + total.append('\n'); + total.append(line); + } + return total.toString(); + } finally { + reader.close(); } - return total.toString(); } } catch (IOException e) { // we'll just return null |