Changeset 11106 in josm


Ignore:
Timestamp:
2016-10-08T23:17:38+02:00 (8 years ago)
Author:
Don-vip
Message:

do not shutdown static executor services in headless mode for jenkins unit tests

File:
1 edited

Legend:

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

    r11093 r11106  
    66import java.awt.BorderLayout;
    77import java.awt.Component;
     8import java.awt.GraphicsEnvironment;
    89import java.awt.Window;
    910import java.awt.event.KeyEvent;
     
    817818
    818819    protected void shutdown() {
    819         worker.shutdown();
    820         ImageProvider.shutdown(false);
    821         JCSCacheManager.shutdown();
     820        if (!GraphicsEnvironment.isHeadless()) {
     821            worker.shutdown();
     822            ImageProvider.shutdown(false);
     823            JCSCacheManager.shutdown();
     824        }
    822825        if (map != null) {
    823826            map.rememberToggleDialogWidth();
     
    830833            Main.warn(ex, tr("Failed to save default preferences."));
    831834        }
    832         worker.shutdownNow();
    833         ImageProvider.shutdown(true);
     835        if (!GraphicsEnvironment.isHeadless()) {
     836            worker.shutdownNow();
     837            ImageProvider.shutdown(true);
     838        }
    834839    }
    835840
Note: See TracChangeset for help on using the changeset viewer.