Index: trunk/src/org/openstreetmap/josm/io/GpxParser.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/GpxParser.java	(revision 18817)
+++ trunk/src/org/openstreetmap/josm/io/GpxParser.java	(revision 18818)
@@ -18,8 +18,6 @@
 
 import java.time.DateTimeException;
-import java.util.ArrayDeque;
 import java.util.ArrayList;
 import java.util.Collection;
-import java.util.Deque;
 import java.util.HashMap;
 import java.util.LinkedList;
@@ -27,4 +25,5 @@
 import java.util.Map;
 import java.util.Optional;
+import java.util.Stack;
 
 import org.openstreetmap.josm.data.Bounds;
@@ -77,6 +76,6 @@
     private GpxExtensionCollection currentExtensionCollection;
     private GpxExtensionCollection currentTrackExtensionCollection;
-    private Deque<State> states;
-    private final Deque<String[]> elements = new ArrayDeque<>();
+    private final Stack<State> states = new Stack<>();
+    private final Stack<String[]> elements = new Stack<>();
 
     private StringBuilder accumulator = new StringBuilder();
@@ -87,5 +86,4 @@
     public void startDocument() {
         accumulator = new StringBuilder();
-        states = new ArrayDeque<>();
         data = new GpxData(true);
         currentExtensionCollection = new GpxExtensionCollection();
@@ -402,5 +400,5 @@
      */
     private void startElementExt(String namespaceURI, String qName, Attributes attributes) {
-        if (states.peekLast() == State.TRK) {
+        if (states.lastElement() == State.TRK) {
             currentTrackExtensionCollection.openChild(namespaceURI, qName, attributes);
         } else {
@@ -651,8 +649,4 @@
                 convertUrlToLink(currentWayPoint.attr);
                 currentWayPoint.getExtensions().addAll(currentExtensionCollection);
-                if (!currentWayPoint.isLatLonKnown()) {
-                    currentExtensionCollection.clear();
-                    throw new SAXException(tr("{0} element does not have valid latitude and/or longitude.", "wpt"));
-                }
                 data.waypoints.add(currentWayPoint);
                 currentExtensionCollection.clear();
@@ -723,5 +717,5 @@
         } else if (currentExtensionCollection != null) {
             String acc = accumulator.toString().trim();
-            if (states.peekLast() == State.TRK) {
+            if (states.lastElement() == State.TRK) {
                 currentTrackExtensionCollection.closeChild(qName, acc); //a segment inside the track can have an extension too
             } else {
