Changeset 13938 in josm


Ignore:
Timestamp:
2018-06-15T23:15:15+02:00 (9 months ago)
Author:
Don-vip
Message:

workaround for following java compiler bugs:

Bug revealed with r13926.

Location:
trunk
Files:
1 added
2 edited

Legend:

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

    r13926 r13938  
    88import java.awt.event.KeyEvent;
    99
    10 import org.openstreetmap.josm.data.osm.IPrimitive;
    1110import org.openstreetmap.josm.data.osm.OsmData;
    1211import org.openstreetmap.josm.tools.Shortcut;
     
    3130            return;
    3231        OsmData<?, ?, ?, ?> ds = getLayerManager().getActiveData();
    33         ds.setSelected(ds.getPrimitives(IPrimitive::isSelectable));
     32        // Do not use method reference before the Java 11 migration
     33        // Otherwise we face a compiler bug, see below:
     34        // https://bugs.openjdk.java.net/browse/JDK-8141508
     35        // https://bugs.openjdk.java.net/browse/JDK-8142476
     36        // https://bugs.openjdk.java.net/browse/JDK-8191655
     37        ds.setSelected(ds.getPrimitives(t -> t.isSelectable()));
    3438    }
    3539
  • trunk/test/unit/org/openstreetmap/josm/actions/SelectByInternalPointActionTest.java

    r12636 r13938  
    5555    }
    5656
    57     private static Layer initDataSet() {
     57    static Layer initDataSet() {
    5858        DataSet ds = new DataSet();
    5959        Node n1 = new Node(new EastNorth(1, 1));
Note: See TracChangeset for help on using the changeset viewer.