Changeset 7033 in josm for trunk/src/org/openstreetmap/josm/data/projection/Projections.java
- Timestamp:
- 2014-05-01T02:34:43+02:00 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/projection/Projections.java
r7005 r7033 132 132 private static void loadInits() { 133 133 Pattern epsgPattern = Pattern.compile("<(\\d+)>(.*)<>"); 134 BufferedReader r = null; 135 try { 134 try ( 136 135 InputStream in = new MirroredInputStream("resource://data/projection/epsg"); 137 r = new BufferedReader(new InputStreamReader(in, Utils.UTF_8)); 136 BufferedReader r = new BufferedReader(new InputStreamReader(in, Utils.UTF_8)); 137 ) { 138 138 String line, lastline = ""; 139 139 while ((line = r.readLine()) != null) { 140 140 line = line.trim(); 141 141 if (!line.startsWith("#") && !line.isEmpty()) { 142 if (!lastline.startsWith("#")) throw new AssertionError( );142 if (!lastline.startsWith("#")) throw new AssertionError("EPSG file seems corrupted"); 143 143 String name = lastline.substring(1).trim(); 144 144 Matcher m = epsgPattern.matcher(line); … … 153 153 } catch (IOException ex) { 154 154 throw new RuntimeException(ex); 155 } finally {156 Utils.close(r);157 155 } 158 156 }
Note:
See TracChangeset
for help on using the changeset viewer.