Changeset 10756 in josm
- Timestamp:
- 2016-08-07T16:55:48+02:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/unit/org/openstreetmap/josm/data/validation/routines/DomainValidatorTestIT.java
r10222 r10756 30 30 import java.lang.reflect.Field; 31 31 import java.lang.reflect.Modifier; 32 import java.net.ConnectException; 32 33 import java.net.HttpURLConnection; 33 34 import java.net.IDN; … … 47 48 48 49 import org.junit.Test; 50 import org.openstreetmap.josm.Main; 49 51 50 52 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; … … 78 80 DomainValidator dv = DomainValidator.getInstance(); 79 81 File txtFile = new File(System.getProperty("java.io.tmpdir"), "tlds-alpha-by-domain.txt"); 80 long timestamp = download(txtFile, "http://data.iana.org/TLD/tlds-alpha-by-domain.txt", 0L); 82 long timestamp; 83 try { 84 timestamp = download(txtFile, "http://data.iana.org/TLD/tlds-alpha-by-domain.txt", 0L); 85 } catch (ConnectException e) { 86 Main.error(e); 87 // Try again one more time in case of random network issue 88 timestamp = download(txtFile, "http://data.iana.org/TLD/tlds-alpha-by-domain.txt", 0L); 89 } 81 90 final File htmlFile = new File(System.getProperty("java.io.tmpdir"), "tlds-alpha-by-domain.html"); 82 91 // N.B. sometimes the html file may be updated a day or so after the txt file
Note:
See TracChangeset
for help on using the changeset viewer.