Ignore:
Timestamp:
2018-07-26T22:01:31+02:00 (6 years ago)
Author:
Don-vip
Message:

see #16010 - use JMockit to enable more extensive test coverage (patch by ris, modified)

see https://github.com/openstreetmap/josm/pull/24/commits for details

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/MainApplication.java

    r13963 r14052  
    488488    @Override
    489489    protected void shutdown() {
    490         if (!GraphicsEnvironment.isHeadless()) {
    491             try {
    492                 worker.shutdown();
    493             } catch (SecurityException e) {
    494                 Logging.log(Logging.LEVEL_ERROR, "Unable to shutdown worker", e);
    495             }
    496             JCSCacheManager.shutdown();
    497         }
     490        try {
     491            worker.shutdown();
     492        } catch (SecurityException e) {
     493            Logging.log(Logging.LEVEL_ERROR, "Unable to shutdown worker", e);
     494        }
     495        JCSCacheManager.shutdown();
     496
    498497        if (mainFrame != null) {
    499498            mainFrame.storeState();
     
    505504        layerManager.resetState();
    506505        super.shutdown();
    507         if (!GraphicsEnvironment.isHeadless()) {
    508             try {
    509                 worker.shutdownNow();
    510             } catch (SecurityException e) {
    511                 Logging.log(Logging.LEVEL_ERROR, "Unable to shutdown worker", e);
    512             }
     506
     507        try {
     508            // in case the current task still hasn't finished
     509            worker.shutdownNow();
     510        } catch (SecurityException e) {
     511            Logging.log(Logging.LEVEL_ERROR, "Unable to shutdown worker", e);
    513512        }
    514513    }
Note: See TracChangeset for help on using the changeset viewer.