Index: trunk/src/org/openstreetmap/josm/actions/SelectAllAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/SelectAllAction.java	(revision 13937)
+++ trunk/src/org/openstreetmap/josm/actions/SelectAllAction.java	(revision 13938)
@@ -8,5 +8,4 @@
 import java.awt.event.KeyEvent;
 
-import org.openstreetmap.josm.data.osm.IPrimitive;
 import org.openstreetmap.josm.data.osm.OsmData;
 import org.openstreetmap.josm.tools.Shortcut;
@@ -31,5 +30,10 @@
             return;
         OsmData<?, ?, ?, ?> ds = getLayerManager().getActiveData();
-        ds.setSelected(ds.getPrimitives(IPrimitive::isSelectable));
+        // Do not use method reference before the Java 11 migration
+        // Otherwise we face a compiler bug, see below:
+        // https://bugs.openjdk.java.net/browse/JDK-8141508
+        // https://bugs.openjdk.java.net/browse/JDK-8142476
+        // https://bugs.openjdk.java.net/browse/JDK-8191655
+        ds.setSelected(ds.getPrimitives(t -> t.isSelectable()));
     }
 
Index: trunk/test/unit/org/openstreetmap/josm/actions/SelectAllActionTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/actions/SelectAllActionTest.java	(revision 13938)
+++ trunk/test/unit/org/openstreetmap/josm/actions/SelectAllActionTest.java	(revision 13938)
@@ -0,0 +1,38 @@
+// License: GPL. For details, see LICENSE file.
+package org.openstreetmap.josm.actions;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.Rule;
+import org.junit.Test;
+import org.openstreetmap.josm.data.osm.DataSet;
+import org.openstreetmap.josm.gui.MainApplication;
+import org.openstreetmap.josm.testutils.JOSMTestRules;
+
+import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
+
+/**
+ * Unit tests for class {@link SelectAllAction}.
+ */
+public final class SelectAllActionTest {
+
+    /**
+     * Setup test.
+     */
+    @Rule
+    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
+    public JOSMTestRules rules = new JOSMTestRules().preferences().projection().main();
+
+    /**
+     * Unit test of {@link SelectAllAction#actionPerformed} method.
+     */
+    @Test
+    public void testActionPerformed() {
+        SelectByInternalPointActionTest.initDataSet();
+        DataSet ds = MainApplication.getLayerManager().getEditDataSet();
+
+        assertEquals(0, ds.getSelected().size());
+        new SelectAllAction().actionPerformed(null);
+        assertEquals(6, ds.getSelected().size());
+    }
+}
Index: trunk/test/unit/org/openstreetmap/josm/actions/SelectByInternalPointActionTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/actions/SelectByInternalPointActionTest.java	(revision 13937)
+++ trunk/test/unit/org/openstreetmap/josm/actions/SelectByInternalPointActionTest.java	(revision 13938)
@@ -55,5 +55,5 @@
     }
 
-    private static Layer initDataSet() {
+    static Layer initDataSet() {
         DataSet ds = new DataSet();
         Node n1 = new Node(new EastNorth(1, 1));
