Changeset 3456 in josm for trunk/src/org
- Timestamp:
- 2010-08-21T23:11:30+02:00 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/io/OsmReader.java
r3423 r3456 121 121 private long currentExternalId; 122 122 private String generator; 123 private Storage<String> internedStrings = new Storage<String>();124 125 // Memory optimization - see #2312126 private String intern(String s) {127 String result = internedStrings.get(s);128 if (result == null) {129 internedStrings.put(s);130 return s;131 } else132 return result;133 }134 123 135 124 @Override public void startElement(String namespaceURI, String localName, String qName, Attributes atts) throws SAXException { … … 276 265 throwException(tr("Missing key or value attribute in tag.")); 277 266 } 278 currentPrimitive.put( intern(key), intern(value));267 currentPrimitive.put(key.intern(), value.intern()); 279 268 280 269 } else {
Note:
See TracChangeset
for help on using the changeset viewer.