Changeset 7082 in josm for trunk/test
- Timestamp:
- 2014-05-09T05:32:37+02:00 (10 years ago)
- Location:
- trunk/test
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/functional/org/openstreetmap/josm/io/MultiFetchServerObjectReaderTest.java
r7081 r7082 14 14 import java.io.OutputStreamWriter; 15 15 import java.io.PrintWriter; 16 import java.nio.charset.StandardCharsets; 16 17 import java.text.MessageFormat; 17 18 import java.util.ArrayList; … … 35 36 import org.openstreetmap.josm.gui.io.UploadStrategySpecification; 36 37 import org.openstreetmap.josm.gui.progress.NullProgressMonitor; 37 import org.openstreetmap.josm.tools.Utils;38 38 39 39 public class MultiFetchServerObjectReaderTest { … … 167 167 try ( 168 168 PrintWriter pw = new PrintWriter( 169 new OutputStreamWriter(new FileOutputStream(dataSetCacheOutputFile), Utils.UTF_8)169 new OutputStreamWriter(new FileOutputStream(dataSetCacheOutputFile), StandardCharsets.UTF_8) 170 170 )) { 171 171 logger.info(MessageFormat.format("caching test data set in ''{0}'' ...", dataSetCacheOutputFile.toString())); -
trunk/test/functional/org/openstreetmap/josm/io/OsmServerBackreferenceReaderTest.java
r7068 r7082 12 12 import java.io.OutputStreamWriter; 13 13 import java.io.PrintWriter; 14 import java.nio.charset.StandardCharsets; 14 15 import java.text.MessageFormat; 15 16 import java.util.ArrayList; … … 36 37 import org.openstreetmap.josm.gui.io.UploadStrategySpecification; 37 38 import org.openstreetmap.josm.gui.progress.NullProgressMonitor; 38 import org.openstreetmap.josm.tools.Utils;39 39 40 40 /** … … 173 173 try ( 174 174 PrintWriter pw = new PrintWriter( 175 new OutputStreamWriter(new FileOutputStream(dataSetCacheOutputFile), Utils.UTF_8)175 new OutputStreamWriter(new FileOutputStream(dataSetCacheOutputFile), StandardCharsets.UTF_8) 176 176 )) { 177 177 logger.info(MessageFormat.format("caching test data set in ''{0}'' ...", dataSetCacheOutputFile.toString())); -
trunk/test/unit/org/openstreetmap/josm/data/projection/ProjectionRefTest.java
r7033 r7082 7 7 import java.io.IOException; 8 8 import java.io.InputStreamReader; 9 import java.nio.charset.StandardCharsets; 9 10 import java.util.Collection; 10 11 import java.util.HashMap; … … 17 18 import org.openstreetmap.josm.gui.preferences.projection.ProjectionChoice; 18 19 import org.openstreetmap.josm.gui.preferences.projection.ProjectionPreference; 19 import org.openstreetmap.josm.tools.Utils;20 20 21 21 /** 22 22 * Test projections using reference data. (Currently provided by proj.4) 23 * 23 * 24 24 * The data file data_nodist/projection-reference-data.csv can be created like this: 25 25 * Fist run this file's main method to collect epsg codes and bounds data. … … 46 46 } 47 47 } 48 48 49 49 @Test 50 50 public void test() throws IOException, FileNotFoundException { 51 51 try (BufferedReader in = new BufferedReader(new InputStreamReader( 52 new FileInputStream("data_nodist/projection-reference-data.csv"), Utils.UTF_8))) {52 new FileInputStream("data_nodist/projection-reference-data.csv"), StandardCharsets.UTF_8))) { 53 53 StringBuilder fail = new StringBuilder(); 54 54 String line; -
trunk/test/unit/org/openstreetmap/josm/data/projection/ProjectionRegressionTest.java
r7081 r7082 11 11 import java.io.InputStreamReader; 12 12 import java.io.OutputStreamWriter; 13 import java.nio.charset.StandardCharsets; 13 14 import java.util.ArrayList; 14 15 import java.util.Collection; … … 30 31 import org.openstreetmap.josm.gui.preferences.projection.ProjectionPreference; 31 32 import org.openstreetmap.josm.tools.Pair; 32 import org.openstreetmap.josm.tools.Utils;33 33 34 34 /** … … 89 89 90 90 Random rand = new Random(); 91 try (BufferedWriter out = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(PROJECTION_DATA_FILE), Utils.UTF_8))) {91 try (BufferedWriter out = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(PROJECTION_DATA_FILE), StandardCharsets.UTF_8))) { 92 92 out.write("# Data for test/unit/org/openstreetmap/josm/data/projection/ProjectionRegressionTest.java\n"); 93 93 out.write("# Format: 1. Projection code; 2. lat/lon; 3. lat/lon projected -> east/north; 4. east/north (3.) inverse projected\n"); … … 112 112 113 113 private static List<TestData> readData() throws IOException, FileNotFoundException { 114 try (BufferedReader in = new BufferedReader(new InputStreamReader(new FileInputStream(PROJECTION_DATA_FILE), Utils.UTF_8))) {114 try (BufferedReader in = new BufferedReader(new InputStreamReader(new FileInputStream(PROJECTION_DATA_FILE), StandardCharsets.UTF_8))) { 115 115 List<TestData> result = new ArrayList<>(); 116 116 String line; -
trunk/test/unit/org/openstreetmap/josm/io/remotecontrol/RemoteControlTest.java
r7081 r7082 12 12 import java.net.MalformedURLException; 13 13 import java.net.URL; 14 import java.nio.charset.StandardCharsets; 14 15 import java.security.GeneralSecurityException; 15 16 import java.security.SecureRandom; … … 28 29 import org.openstreetmap.josm.JOSMFixture; 29 30 import org.openstreetmap.josm.Main; 30 import org.openstreetmap.josm.tools.Utils;31 31 32 32 /** … … 125 125 // TODO this code should be refactored somewhere in Utils as it is used in several JOSM classes 126 126 StringBuilder responseBody = new StringBuilder(); 127 try (BufferedReader in = new BufferedReader(new InputStreamReader(is, Utils.UTF_8))) {127 try (BufferedReader in = new BufferedReader(new InputStreamReader(is, StandardCharsets.UTF_8))) { 128 128 String s; 129 129 while((s = in.readLine()) != null) { -
trunk/test/unit/org/openstreetmap/josm/tools/BugReportExceptionHandlerTest.java
r7081 r7082 7 7 import java.io.ByteArrayInputStream; 8 8 import java.io.IOException; 9 import java.nio.charset.StandardCharsets; 9 10 import java.util.zip.GZIPInputStream; 10 11 … … 49 50 StringBuilder sb = new StringBuilder(); 50 51 for (int n = is.read(buff); n > 0; n = is.read(buff)) { 51 sb.append(new String(buff, 0, n, Utils.UTF_8));52 sb.append(new String(buff, 0, n, StandardCharsets.UTF_8)); 52 53 } 53 54 assertEquals(report, sb.toString());
Note:
See TracChangeset
for help on using the changeset viewer.