Index: trunk/test/unit/org/openstreetmap/josm/TestUtils.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/TestUtils.java	(revision 16642)
+++ trunk/test/unit/org/openstreetmap/josm/TestUtils.java	(revision 16643)
@@ -598,6 +598,5 @@
     public static List<String> getIgnoredErrorMessages(Class<?> integrationTest) throws IOException {
         return Arrays.stream(new WikiReader()
-                .read("https://josm.openstreetmap.de/wiki/IntegrationTestIgnores?format=txt")
-                .split("\\n"))
+                .read("https://josm.openstreetmap.de/wiki/IntegrationTestIgnores?format=txt").split("\\n", -1))
                 .filter(s -> s.startsWith("|| " + integrationTest.getSimpleName() + " ||"))
                 .map(s -> s.substring(s.indexOf("{{{") + 3, s.indexOf("}}}")))
Index: trunk/test/unit/org/openstreetmap/josm/data/osm/TagCollectionTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/data/osm/TagCollectionTest.java	(revision 16642)
+++ trunk/test/unit/org/openstreetmap/josm/data/osm/TagCollectionTest.java	(revision 16643)
@@ -689,5 +689,5 @@
         TagCollection g = new TagCollection(Arrays.asList(new Tag("k", "b"), new Tag("k", "a"), new Tag("k", "b"),
                 new Tag("k", "c"), new Tag("k", "d")));
-        assertEquals("a;b;c;d", Stream.of(g.getJoinedValues("k").split(";")).sorted().collect(Collectors.joining(";")));
+        assertEquals("a;b;c;d", Stream.of(g.getJoinedValues("k").split(";", -1)).sorted().collect(Collectors.joining(";")));
     }
 
Index: trunk/test/unit/org/openstreetmap/josm/data/projection/ProjectionRefTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/data/projection/ProjectionRefTest.java	(revision 16642)
+++ trunk/test/unit/org/openstreetmap/josm/data/projection/ProjectionRefTest.java	(revision 16643)
@@ -99,5 +99,5 @@
             debug = "debug".equals(args[0]);
             if (args[args.length - 1].startsWith("EPSG:")) {
-                forcedCodes = Arrays.asList(args[args.length - 1].split(","));
+                forcedCodes = Arrays.asList(args[args.length - 1].split(",", -1));
             }
         }
@@ -137,5 +137,5 @@
                     result.add(curEntry);
                 } else if (curEntry != null) {
-                    String[] f = line.trim().split(",");
+                    String[] f = line.trim().split(",", -1);
                     double lon = Double.parseDouble(f[0]);
                     double lat = Double.parseDouble(f[1]);
@@ -277,5 +277,5 @@
         List<String> args = new ArrayList<>();
         args.add(CS2CS_EXE);
-        args.addAll(Arrays.asList("-f %.9f +proj=longlat +datum=WGS84 +to".split(" ")));
+        args.addAll(Arrays.asList("-f %.9f +proj=longlat +datum=WGS84 +to".split(" ", -1)));
         // proj.4 cannot read our ntf_r93_b.gsb file
         // possibly because it is big endian. Use equivalent
@@ -286,5 +286,5 @@
             def = def.replace("'", "\\'").replace("\"", "\\\"");
         }
-        args.addAll(Arrays.asList(def.split(" ")));
+        args.addAll(Arrays.asList(def.split(" ", -1)));
         ProcessBuilder pb = new ProcessBuilder(args);
         pb.environment().put("PROJ_LIB", new File(PROJ_LIB_DIR).getAbsolutePath());
Index: trunk/test/unit/org/openstreetmap/josm/data/projection/ProjectionRegressionTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/data/projection/ProjectionRegressionTest.java	(revision 16642)
+++ trunk/test/unit/org/openstreetmap/josm/data/projection/ProjectionRegressionTest.java	(revision 16643)
@@ -125,5 +125,5 @@
 
     private static Pair<Double, Double> readLine(String expectedName, String input) {
-        String[] fields = input.trim().split("[ ]+");
+        String[] fields = input.trim().split("[ ]+", -1);
         if (fields.length != 3) throw new AssertionError();
         if (!fields[0].equals(expectedName)) throw new AssertionError();
Index: trunk/test/unit/org/openstreetmap/josm/data/validation/tests/ValidatorTestUtils.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/data/validation/tests/ValidatorTestUtils.java	(revision 16642)
+++ trunk/test/unit/org/openstreetmap/josm/data/validation/tests/ValidatorTestUtils.java	(revision 16643)
@@ -51,5 +51,5 @@
                     Set<Integer> expectedCodes = new TreeSet<>();
                     if (!"none".equals(codes)) {
-                        for (String code : codes.split(",")) {
+                        for (String code : codes.split(",", -1)) {
                             expectedCodes.add(Integer.parseInt(code));
                         }
Index: trunk/test/unit/org/openstreetmap/josm/gui/mappaint/RenderingCLIAreaTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/mappaint/RenderingCLIAreaTest.java	(revision 16642)
+++ trunk/test/unit/org/openstreetmap/josm/gui/mappaint/RenderingCLIAreaTest.java	(revision 16643)
@@ -154,5 +154,5 @@
 
     public RenderingCLIAreaTest(String args, Matcher<Double> scaleMatcher, Matcher<Bounds> boundsMatcher) {
-        this.args = args.split("\\s+");
+        this.args = args.split("\\s+", -1);
         this.scaleMatcher = scaleMatcher;
         this.boundsMatcher = boundsMatcher;
Index: trunk/test/unit/org/openstreetmap/josm/gui/preferences/imagery/ImageryPreferenceTestIT.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/preferences/imagery/ImageryPreferenceTestIT.java	(revision 16642)
+++ trunk/test/unit/org/openstreetmap/josm/gui/preferences/imagery/ImageryPreferenceTestIT.java	(revision 16643)
@@ -248,5 +248,5 @@
         // Check if we have received an error message
         String error = helper.detectErrorMessage(new String(data, StandardCharsets.UTF_8));
-        String errorMsg = url + zoomMarker(zoom) + (error != null ? error.split("\\n")[0] : defaultMessage);
+        String errorMsg = url + zoomMarker(zoom) + (error != null ? error.split("\\n", -1)[0] : defaultMessage);
         addError(info, errorMsg);
         return errorMsg;
@@ -344,5 +344,5 @@
 
     private static boolean isZoomError(String error) {
-        String[] parts = error.split(ERROR_SEP);
+        String[] parts = error.split(ERROR_SEP, -1);
         String lastPart = parts.length > 0 ? parts[parts.length - 1].toLowerCase(Locale.ENGLISH) : "";
         return lastPart.contains("bbox")
Index: trunk/test/unit/org/openstreetmap/josm/tools/KeyboardUtilsTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/tools/KeyboardUtilsTest.java	(revision 16642)
+++ trunk/test/unit/org/openstreetmap/josm/tools/KeyboardUtilsTest.java	(revision 16643)
@@ -108,5 +108,5 @@
     private static void testgetCharactersForKeyE00(String locale, Character... expected) {
         if (locale.contains("_")) {
-            String[] l = locale.split("_");
+            String[] l = locale.split("_", -1);
             testgetCharactersForKeyE00(new Locale(l[0], l[1]), expected);
         } else {
