Ignore:
Timestamp:
2013-04-16T19:57:43+02:00 (13 years ago)
Author:
Don-vip
Message:

see #8570, #7406 - I/O refactorization:

  • Move different file copy functions to Utils.copyFile (to be replaced later by Files.copy when switching to Java 7)
  • Replace all Utils.close(XXX) by Utils.close(Closeable) -> impacted plugins: commandline, mirrored_download, opendata, piclayer
  • Add new Utils.close(ZipFile)
  • Use of Utils.close almost everywhere
  • Javadoc fixes
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/tools/BugReportExceptionHandler.java

    r5849 r5874  
    4444
    4545    //http://stuffthathappens.com/blog/2007/10/15/one-more-note-on-uncaught-exception-handlers/
     46    /**
     47     * Handles the given throwable object
     48     * @param t The throwable object
     49     */
    4650    public void handle(Throwable t) {
    4751        handleException(t);
    4852    }
    4953
     54    /**
     55     * Handles the given exception
     56     * @param e the exception
     57     */
    5058    public static void handleException(final Throwable e) {
    5159        if (handlingInProgress)
     
    165173        }
    166174    }
     175   
     176    /**
     177     * Determines if an exception is currently being handled
     178     * @return {@code true} if an exception is currently being handled, {@code false} otherwise
     179     */
    167180    public static boolean exceptionHandlingInProgress() {
    168181        return handlingInProgress;
     
    180193            GZIPOutputStream gzip = new GZIPOutputStream(out);
    181194            gzip.write(debugText.getBytes("UTF-8"));
    182             gzip.close();
     195            Utils.close(gzip);
    183196   
    184197            return new URL("http://josm.openstreetmap.de/josmticket?" +
Note: See TracChangeset for help on using the changeset viewer.