Changeset 12841 in josm for trunk/src/org/openstreetmap/josm/io
- Timestamp:
- 2017-09-13T16:30:27+02:00 (7 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/io
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/io/CacheCustomContent.java
r12620 r12841 91 91 return false; 92 92 } 93 return Main.pref.getInt eger("cache." + ident, 0) + updateInterval < TimeUnit.MILLISECONDS.toSeconds(System.currentTimeMillis())93 return Main.pref.getInt("cache." + ident, 0) + updateInterval < TimeUnit.MILLISECONDS.toSeconds(System.currentTimeMillis()) 94 94 || !isCacheValid(); 95 95 } … … 141 141 this.data = updateData(); 142 142 saveToDisk(); 143 Main.pref.putInt eger("cache." + ident, (int) (TimeUnit.MILLISECONDS.toSeconds(System.currentTimeMillis())));143 Main.pref.putInt("cache." + ident, (int) (TimeUnit.MILLISECONDS.toSeconds(System.currentTimeMillis()))); 144 144 return data; 145 145 } -
trunk/src/org/openstreetmap/josm/io/CachedFile.java
r12620 r12841 381 381 if (!"file".equals(url.getProtocol())) { 382 382 String prefKey = getPrefKey(url, destDir); 383 List<String> localPath = new ArrayList<>(Main.pref.get Collection(prefKey));383 List<String> localPath = new ArrayList<>(Main.pref.getList(prefKey)); 384 384 if (localPath.size() == 2) { 385 385 File lfile = new File(localPath.get(1)); … … 388 388 } 389 389 } 390 Main.pref.put Collection(prefKey, null);390 Main.pref.putList(prefKey, null); 391 391 } 392 392 } catch (MalformedURLException e) { … … 419 419 Long ifModifiedSince = null; 420 420 File localFile = null; 421 List<String> localPathEntry = new ArrayList<>(Main.pref.get Collection(prefKey));421 List<String> localPathEntry = new ArrayList<>(Main.pref.getList(prefKey)); 422 422 boolean offline = false; 423 423 try { … … 476 476 if (localFile == null) 477 477 throw new AssertionError(); 478 Main.pref.put Collection(prefKey,478 Main.pref.putList(prefKey, 479 479 Arrays.asList(Long.toString(System.currentTimeMillis()), localPathEntry.get(1))); 480 480 return localFile; … … 488 488 localFile = new File(destDir, localPath); 489 489 if (Main.platform.rename(destDirFile, localFile)) { 490 Main.pref.put Collection(prefKey,490 Main.pref.putList(prefKey, 491 491 Arrays.asList(Long.toString(System.currentTimeMillis()), localFile.toString())); 492 492 } else { -
trunk/src/org/openstreetmap/josm/io/DefaultProxySelector.java
r12805 r12841 161 161 } 162 162 proxyExceptions = new HashSet<>( 163 Main.pref.get Collection(PROXY_EXCEPTIONS,163 Main.pref.getList(PROXY_EXCEPTIONS, 164 164 Arrays.asList("localhost", IPV4_LOOPBACK, IPV6_LOOPBACK)) 165 165 ); -
trunk/src/org/openstreetmap/josm/io/MultiFetchServerObjectReader.java
r12816 r12841 321 321 // Build a list of fetchers that will download smaller sets containing only MAX_IDS_PER_REQUEST (200) primitives each. 322 322 // we will run up to MAX_DOWNLOAD_THREADS concurrent fetchers. 323 int threadsNumber = Main.pref.getInt eger("osm.download.threads", OsmApi.MAX_DOWNLOAD_THREADS);323 int threadsNumber = Main.pref.getInt("osm.download.threads", OsmApi.MAX_DOWNLOAD_THREADS); 324 324 threadsNumber = Utils.clamp(threadsNumber, 1, OsmApi.MAX_DOWNLOAD_THREADS); 325 325 final ExecutorService exec = Executors.newFixedThreadPool( -
trunk/src/org/openstreetmap/josm/io/OsmApi.java
r12805 r12841 593 593 */ 594 594 protected int getMaxRetries() { 595 int ret = Main.pref.getInt eger("osm-server.max-num-retries", DEFAULT_MAX_NUM_RETRIES);595 int ret = Main.pref.getInt("osm-server.max-num-retries", DEFAULT_MAX_NUM_RETRIES); 596 596 return Math.max(ret, 0); 597 597 } -
trunk/src/org/openstreetmap/josm/io/OverpassDownloadReader.java
r12816 r12841 33 33 import org.openstreetmap.josm.data.osm.PrimitiveId; 34 34 import org.openstreetmap.josm.data.preferences.BooleanProperty; 35 import org.openstreetmap.josm.data.preferences. CollectionProperty;35 import org.openstreetmap.josm.data.preferences.ListProperty; 36 36 import org.openstreetmap.josm.data.preferences.StringProperty; 37 37 import org.openstreetmap.josm.gui.progress.ProgressMonitor; … … 59 59 * @since 12816 60 60 */ 61 public static final CollectionProperty OVERPASS_SERVER_HISTORY = new CollectionProperty("download.overpass.servers",61 public static final ListProperty OVERPASS_SERVER_HISTORY = new ListProperty("download.overpass.servers", 62 62 Arrays.asList("https://overpass-api.de/api/", "http://overpass.osm.rambler.ru/cgi/")); 63 63 /** -
trunk/src/org/openstreetmap/josm/io/remotecontrol/RemoteControlHttpServer.java
r12620 r12841 33 33 public static void restartRemoteControlHttpServer() { 34 34 stopRemoteControlHttpServer(); 35 int port = Main.pref.getInt eger("remote.control.port", 8111);35 int port = Main.pref.getInt("remote.control.port", 8111); 36 36 try { 37 37 instance4 = new RemoteControlHttpServer(port, false); -
trunk/src/org/openstreetmap/josm/io/remotecontrol/RemoteControlHttpsServer.java
r12620 r12841 312 312 stopRemoteControlHttpsServer(); 313 313 if (RemoteControl.PROP_REMOTECONTROL_HTTPS_ENABLED.get()) { 314 int port = Main.pref.getInt eger("remote.control.https.port", HTTPS_PORT);314 int port = Main.pref.getInt("remote.control.https.port", HTTPS_PORT); 315 315 try { 316 316 instance4 = new RemoteControlHttpsServer(port, false);
Note:
See TracChangeset
for help on using the changeset viewer.