Changeset 15716 in josm for trunk/test/unit


Ignore:
Timestamp:
2020-01-18T14:13:56+01:00 (5 years ago)
Author:
simon04
Message:

Java 8: use String.join

Location:
trunk/test/unit/org/openstreetmap/josm
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/org/openstreetmap/josm/data/projection/ProjectionRefTest.java

    r15034 r15716  
    3232import java.util.regex.Pattern;
    3333
     34import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    3435import org.junit.Assert;
    3536import org.junit.Rule;
     
    4243import org.openstreetmap.josm.tools.Pair;
    4344import org.openstreetmap.josm.tools.PlatformManager;
    44 import org.openstreetmap.josm.tools.Utils;
    45 
    46 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    4745
    4846/**
     
    323321            }
    324322        } catch (IOException e) {
    325             System.err.println("Error: Running external command failed: " + e + "\nCommand was: "+Utils.join(" ", args));
     323            System.err.println("Error: Running external command failed: " + e + "\nCommand was: " + String.join(" ", args));
    326324            return null;
    327325        }
     
    341339            return new EastNorth(Double.parseDouble(es), Double.parseDouble(ns));
    342340        } catch (NumberFormatException nfe) {
    343             System.err.println("Error: Cannot parse cs2cs output: '" + es + "', '" + ns + "'" + "\nCommand was: "+Utils.join(" ", args));
     341            System.err.println("Error: Cannot parse cs2cs output: '" + es + "', '" + ns + "'" + "\nCommand was: " + String.join(" ", args));
    344342            return null;
    345343        }
  • trunk/test/unit/org/openstreetmap/josm/gui/io/CustomConfiguratorTest.java

    r12849 r15716  
    5555                "Mauris ac mauris sed pede pellentesque fermentum. Maecenas adipiscing ante non diam sodales hendrerit."));
    5656        CustomConfigurator.exportPreferencesKeysToFile(tmp.getAbsolutePath(), false, "lorem_ipsum");
    57         String xml = Utils.join("\n", Files.readAllLines(tmp.toPath(), StandardCharsets.UTF_8));
     57        String xml = String.join("\n", Files.readAllLines(tmp.toPath(), StandardCharsets.UTF_8));
    5858        assertTrue(xml.contains("<preferences operation=\"replace\">"));
    5959        for (String entry : Config.getPref().getList("lorem_ipsum")) {
     
    6363        Config.getPref().putList("test", Arrays.asList("11111111", "2222222", "333333333"));
    6464        CustomConfigurator.exportPreferencesKeysByPatternToFile(tmp.getAbsolutePath(), true, "test");
    65         xml = Utils.join("\n", Files.readAllLines(tmp.toPath(), StandardCharsets.UTF_8));
     65        xml = String.join("\n", Files.readAllLines(tmp.toPath(), StandardCharsets.UTF_8));
    6666        assertTrue(xml.contains("<preferences operation=\"append\">"));
    6767        for (String entry : Config.getPref().getList("test")) {
Note: See TracChangeset for help on using the changeset viewer.