Changeset 17351 in josm for trunk/src/org/openstreetmap


Ignore:
Timestamp:
2020-11-24T09:28:40+01:00 (4 years ago)
Author:
GerdP
Message:

fix sonar issue

File:
1 edited

Legend:

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

    r17347 r17351  
    5757    public static UndoRedoHandler getInstance() {
    5858        OsmDataLayer editLayer = MainApplication.getLayerManager().getEditLayer();
    59         if (editLayer != null) {
    60             if (editLayer == MainApplication.getLayerManager().getActiveLayer()) {
    61                 return InstanceHolder.map.computeIfAbsent(editLayer.data, k -> new UndoRedoHandler());
    62             }
     59        if (editLayer != null && editLayer == MainApplication.getLayerManager().getActiveLayer()) {
     60            return InstanceHolder.map.computeIfAbsent(editLayer.data, k -> new UndoRedoHandler());
    6361        }
    6462        return InstanceHolder.NO_DATA_SET_INSTANCE;
Note: See TracChangeset for help on using the changeset viewer.