← Back to team overview

gnome-split-team team mailing list archive

[Branch ~gnome-split-team/gnome-split/mainline] Rev 276: Streams should always be closed.

 

------------------------------------------------------------
revno: 276
committer: Guillaume Mazoyer <respawneral@xxxxxxxxx>
branch nick: gnome-split
timestamp: Fri 2012-03-09 03:23:45 +0100
message:
  Streams should always be closed.
  
  Close streams used to get the stack trace of an exception
  in the uncaught exception handler.
  Shame on me for not seeing this error early.
modified:
  src/org/gnome/split/core/utils/UncaughtExceptionLogger.java


--
lp:gnome-split
https://code.launchpad.net/~gnome-split-team/gnome-split/mainline

Your team GNOME Split developers is subscribed to branch lp:gnome-split.
To unsubscribe from this branch go to https://code.launchpad.net/~gnome-split-team/gnome-split/mainline/+edit-subscription
=== modified file 'src/org/gnome/split/core/utils/UncaughtExceptionLogger.java'
--- src/org/gnome/split/core/utils/UncaughtExceptionLogger.java	2012-02-04 05:12:19 +0000
+++ src/org/gnome/split/core/utils/UncaughtExceptionLogger.java	2012-03-09 02:23:45 +0000
@@ -20,6 +20,7 @@
  */
 package org.gnome.split.core.utils;
 
+import java.io.IOException;
 import java.io.PrintWriter;
 import java.io.StringWriter;
 
@@ -50,6 +51,13 @@
         pwriter.flush();
         swriter.flush();
 
+        pwriter.close();
+        try {
+            swriter.close();
+        } catch (IOException e) {
+            e.printStackTrace();
+        }
+
         return swriter.toString();
     }