Changeset 7033 in josm for trunk/src/org/openstreetmap/josm/gui/mappaint/xml/XmlStyleSource.java
- Timestamp:
- 2014-05-01T02:34:43+02:00 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/mappaint/xml/XmlStyleSource.java
r7005 r7033 75 75 init(); 76 76 try { 77 InputStream in = getSourceInputStream(); 78 try { 79 InputStreamReader reader = new InputStreamReader(in, Utils.UTF_8); 77 try ( 78 InputStream in = getSourceInputStream(); 79 InputStreamReader reader = new InputStreamReader(in, Utils.UTF_8) 80 ) { 80 81 XmlObjectParser parser = new XmlObjectParser(new XmlStyleSourceHandler(this)); 81 82 parser.startWithValidation(reader, … … 83 84 "resource://data/mappaint-style.xsd"); 84 85 while (parser.hasNext()); 85 } finally { 86 closeSourceInputStream(in); 87 } 88 86 } 89 87 } catch (IOException e) { 90 88 Main.warn(tr("Failed to load Mappaint styles from ''{0}''. Exception was: {1}", url, e.toString())); … … 377 375 } 378 376 } 379 380 377 }
Note:
See TracChangeset
for help on using the changeset viewer.
