Changeset 8856 in josm for trunk/src/org/openstreetmap/josm/io
- Timestamp:
- 2015-10-11T15:28:33+02:00 (9 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/io
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/io/GpxReader.java
r8851 r8856 7 7 import java.io.InputStream; 8 8 import java.io.Reader; 9 import java.util.ArrayDeque;10 9 import java.util.ArrayList; 11 10 import java.util.Collection; 12 import java.util.Deque;13 11 import java.util.HashMap; 14 12 import java.util.LinkedList; 15 13 import java.util.List; 16 14 import java.util.Map; 15 import java.util.Stack; 17 16 18 17 import javax.xml.parsers.ParserConfigurationException; … … 65 64 private GpxLink currentLink; 66 65 private Extensions currentExtensions; 67 private Deque<State> states;68 private final Deque<String> elements = new ArrayDeque<>();66 private Stack<State> states; 67 private final Stack<String> elements = new Stack<>(); 69 68 70 69 private StringBuilder accumulator = new StringBuilder(); … … 75 74 public void startDocument() { 76 75 accumulator = new StringBuilder(); 77 states = new ArrayDeque<>();76 states = new Stack<>(); 78 77 data = new GpxData(); 79 78 } … … 477 476 @Override 478 477 public void endDocument() throws SAXException { 479 if (!states. isEmpty())478 if (!states.empty()) 480 479 throw new SAXException(tr("Parse error: invalid document structure for GPX document.")); 481 480 Extensions metaExt = (Extensions) data.get(META_EXTENSIONS); -
trunk/src/org/openstreetmap/josm/io/imagery/ImageryReader.java
r8851 r8856 4 4 import java.io.IOException; 5 5 import java.io.InputStream; 6 import java.util.ArrayDeque;7 6 import java.util.ArrayList; 8 7 import java.util.Arrays; 9 import java.util.Deque;10 8 import java.util.HashMap; 11 9 import java.util.List; 12 10 import java.util.Map; 13 11 import java.util.Objects; 12 import java.util.Stack; 14 13 15 14 import javax.xml.parsers.ParserConfigurationException; … … 73 72 private StringBuilder accumulator = new StringBuilder(); 74 73 75 private Deque<State> states;74 private Stack<State> states; 76 75 77 76 private List<ImageryInfo> entries; … … 96 95 accumulator = new StringBuilder(); 97 96 skipEntry = false; 98 states = new ArrayDeque<>();97 states = new Stack<>(); 99 98 states.push(State.INIT); 100 99 entries = new ArrayList<>();
Note:
See TracChangeset
for help on using the changeset viewer.