Changeset 4025 in josm
- Timestamp:
- 2011-04-15T21:09:55+02:00 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/osm/User.java
r3828 r4025 2 2 package org.openstreetmap.josm.data.osm; 3 3 4 import java.io.BufferedReader; 5 import java.io.InputStreamReader; 6 import java.io.IOException; 7 4 8 import java.util.ArrayList; 9 import java.util.concurrent.atomic.AtomicLong; 5 10 import java.util.HashMap; 6 11 import java.util.HashSet; 7 12 import java.util.List; 8 import java.util.concurrent.atomic.AtomicLong; 13 14 import org.openstreetmap.josm.Main; 9 15 import org.openstreetmap.josm.io.MirroredInputStream; 10 import java.io.InputStreamReader;11 import java.io.BufferedReader;12 16 13 17 /** … … 109 113 relicensingUsers = new HashSet<Long>(); 110 114 try { 111 MirroredInputStream stream = new MirroredInputStream("http://planet.openstreetmap.org/users_agreed/users_agreed.txt", 7200); 112 InputStreamReader r; 113 r = new InputStreamReader(stream); 114 BufferedReader reader = new BufferedReader(r); 115 String line; 116 while ((line = reader.readLine()) != null) { 117 if (line.startsWith("#")) continue; 115 MirroredInputStream stream = new MirroredInputStream(Main.pref.get("url.licensechange", 116 "http://planet.openstreetmap.org/users_agreed/users_agreed.txt"), 7200); 118 117 try { 119 relicensingUsers.add(new Long(Long.parseLong(line.trim()))); 120 } catch (java.lang.NumberFormatException ex) { 118 InputStreamReader r; 119 r = new InputStreamReader(stream); 120 BufferedReader reader = new BufferedReader(r); 121 String line; 122 while ((line = reader.readLine()) != null) { 123 if (line.startsWith("#")) continue; 124 try { 125 relicensingUsers.add(new Long(Long.parseLong(line.trim()))); 126 } catch (java.lang.NumberFormatException ex) { 127 } 128 } 121 129 } 122 } 123 stream.close(); 124 } catch (java.io.IOException ex) { 130 finally { 131 stream.close(); 132 } 133 } catch (IOException ex) { 125 134 } 126 135 }
Note:
See TracChangeset
for help on using the changeset viewer.