Changeset 13219 in josm


Ignore:
Timestamp:
2017-12-18T00:14:48+01:00 (5 weeks ago)
Author:
Don-vip
Message:

see #15653, see #8509 - fix unit test causing mayhem

Location:
trunk
Files:
2 edited

Legend:

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

    r13215 r13219  
    1717import org.openstreetmap.josm.gui.io.AsynchronousUploadPrimitivesTask;
    1818import org.openstreetmap.josm.gui.util.GuiHelper;
     19import org.openstreetmap.josm.tools.Logging;
    1920
    2021/**
     
    426427            activeLayerChangeListeners.clear();
    427428            layerAvailabilityListeners.clear();
    428         } else if (!GraphicsEnvironment.isHeadless()) {
    429             GuiHelper.runInEDT(() -> JOptionPane.showMessageDialog(MainApplication.parent,
    430                     tr("A background upload is already in progress. Cannot reset state until the upload is finished.")));
     429        } else {
     430            String msg = tr("A background upload is already in progress. Cannot reset state until the upload is finished.");
     431            Logging.warn(msg);
     432            if (!GraphicsEnvironment.isHeadless()) {
     433                GuiHelper.runInEDT(() -> JOptionPane.showMessageDialog(MainApplication.parent, msg));
     434            }
    431435        }
    432436    }
  • trunk/test/unit/org/openstreetmap/josm/gui/io/AsynchronousUploadPrimitivesTaskTest.java

    r13133 r13219  
    22package org.openstreetmap.josm.gui.io;
    33
    4 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
     4import java.util.Optional;
     5
     6import org.junit.After;
     7import org.junit.Assert;
     8import org.junit.Before;
    59import org.junit.Rule;
    6 import org.junit.Before;
    7 import org.junit.After;
    810import org.junit.Test;
    9 import org.junit.Assert;
    1011import org.openstreetmap.josm.data.APIDataSet;
    1112import org.openstreetmap.josm.data.coor.LatLon;
     
    1819import org.openstreetmap.josm.testutils.JOSMTestRules;
    1920
    20 import java.util.Optional;
     21import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    2122
     23/**
     24 * Unit tests of {@link AsynchronousUploadPrimitivesTask}.
     25 */
    2226public class AsynchronousUploadPrimitivesTaskTest {
    2327
     
    6266        strategy = null;
    6367        changeset = null;
     68        uploadPrimitivesTask.cancel();
    6469        uploadPrimitivesTask = null;
    6570    }
Note: See TracChangeset for help on using the changeset viewer.