Changeset 13941 in josm for trunk/src


Ignore:
Timestamp:
2018-06-17T14:23:33+02:00 (13 months ago)
Author:
Don-vip
Message:

sonar - fix recent violations

Location:
trunk/src/org/openstreetmap/josm
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/actions/mapmode/DrawAction.java

    r13882 r13941  
    13501350    public Collection<OsmPrimitive> getInProgressSelection() {
    13511351        DataSet ds = getLayerManager().getEditDataSet();
    1352         if (ds == null) return null;
     1352        if (ds == null) return Collections.emptyList();
    13531353        if (getCurrentBaseNode() != null && !ds.selectionEmpty()) {
    13541354            Way continueFrom = getWayForNode(getCurrentBaseNode());
  • trunk/src/org/openstreetmap/josm/gui/MainApplication.java

    r13927 r13941  
    543543        } else {
    544544            OsmData<?, ?, ?, ?> ds = layerManager.getActiveData();
    545             if (ds == null) return null;
     545            if (ds == null) return Collections.emptyList();
    546546            return ds.getSelected();
    547547        }
  • trunk/src/org/openstreetmap/josm/gui/dialogs/properties/PropertiesDialog.java

    r13926 r13941  
    566566
    567567        // Ignore parameter as we do not want to operate always on real selection here, especially in draw mode
    568         Collection<? extends IPrimitive> newSel = Optional.ofNullable(Main.main.getInProgressISelection()).orElseGet(Collections::emptyList);
     568        Collection<? extends IPrimitive> newSel = Main.main.getInProgressISelection();
    569569        String selectedTag;
    570570        Relation selectedRelation = null;
  • trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/RequestHandler.java

    r13935 r13941  
    309309
    310310    private boolean get(String key) {
    311         return get(key, Boolean::parseBoolean, () -> false);
     311        return get(key, Boolean::parseBoolean, () -> Boolean.FALSE);
    312312    }
    313313
Note: See TracChangeset for help on using the changeset viewer.