Ignore:
Timestamp:
2016-06-15T10:30:37+02:00 (8 years ago)
Author:
Don-vip
Message:

Checkstyle 6.19: enable SingleSpaceSeparator and fix violations

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

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/org/openstreetmap/josm/actions/OrthogonalizeActionTest.java

    r10052 r10378  
    9696    void verifyRectangleClockwise(final Way way) {
    9797        for (int i = 1; i < way.getNodesCount() - 1; i++) {
    98             assertEquals(-Math.PI / 2,  Geometry.getCornerAngle(
     98            assertEquals(-Math.PI / 2, Geometry.getCornerAngle(
    9999                    way.getNode(i - 1).getEastNorth(), way.getNode(i).getEastNorth(), way.getNode(i + 1).getEastNorth()), 1e-6);
    100100        }
  • trunk/test/unit/org/openstreetmap/josm/data/cache/JCSCachedTileLoaderJobTest.java

    r10222 r10378  
    7979     */
    8080    @Test
    81     public void testStatusCodes() throws IOException, InterruptedException  {
     81    public void testStatusCodes() throws IOException, InterruptedException {
    8282        doTestStatusCode(200);
    8383        // can't test for 3xx, as httpstat.us redirects finally to 200 page
  • trunk/test/unit/org/openstreetmap/josm/data/coor/LatLonTest.java

    r10334 r10378  
    3333    @SuppressFBWarnings(value = "MS_PKGPROTECT")
    3434    public static final double[] SAMPLE_VALUES = new double[]{
     35            // CHECKSTYLE.OFF: SingleSpaceSeparator
    3536            -180.0, -179.9, -179.6, -179.5, -179.4, -179.1, -179.0, -100.0, -99.9, -10.0, -9.9, -1.0, -0.1,
    36             180.0,  179.9,  179.6,  179.5,  179.4,  179.1,  179.0,  100.0,  99.9,  10.0,  9.9,  1.0,  0.1,
     37             180.0,  179.9,  179.6,  179.5,  179.4,  179.1,  179.0,  100.0,  99.9,  10.0,  9.9,  1.0,  0.1,
    3738            0.12, 0.123, 0.1234, 0.12345, 0.123456, 0.1234567,
    3839            1.12, 1.123, 1.1234, 1.12345, 1.123456, 1.1234567,
    3940            10.12, 10.123, 10.1234, 10.12345, 10.123456, 10.1234567,
    4041            100.12, 100.123, 100.1234, 100.12345, 100.123456, 100.1234567
     42            // CHECKSTYLE.ON: SingleSpaceSeparator
    4143           };
    4244
     
    5456        assertEquals(LatLon.roundToOsmPrecision(-0.0), 0.0, 0);
    5557
     58        // CHECKSTYLE.OFF: SingleSpaceSeparator
    5659        assertEquals(LatLon.roundToOsmPrecision(0.12345678),  0.1234568, 0);
    5760        assertEquals(LatLon.roundToOsmPrecision(0.123456789), 0.1234568, 0);
     
    6568        assertEquals(LatLon.roundToOsmPrecision(100.12345678),  100.1234568, 0);
    6669        assertEquals(LatLon.roundToOsmPrecision(100.123456789), 100.1234568, 0);
     70        // CHECKSTYLE.ON: SingleSpaceSeparator
    6771
    68         assertEquals(LatLon.roundToOsmPrecision(100.00000001),  100.0000000, 0);
    69         assertEquals(LatLon.roundToOsmPrecision(100.000000001),  100.0000000, 0);
    70         assertEquals(LatLon.roundToOsmPrecision(100.0000000001),  100.0000000, 0);
    71         assertEquals(LatLon.roundToOsmPrecision(100.00000000001),  100.0000000, 0);
    72         assertEquals(LatLon.roundToOsmPrecision(100.000000000001),  100.0000000, 0);
    73         assertEquals(LatLon.roundToOsmPrecision(100.0000000000001),  100.0000000, 0);
    74         assertEquals(LatLon.roundToOsmPrecision(100.00000000000001),  100.0000000, 0);
    75         assertEquals(LatLon.roundToOsmPrecision(100.000000000000001),  100.0000000, 0);
    76         assertEquals(LatLon.roundToOsmPrecision(100.0000000000000001),  100.0000000, 0);
    77         assertEquals(LatLon.roundToOsmPrecision(100.00000000000000001),  100.0000000, 0);
    78         assertEquals(LatLon.roundToOsmPrecision(100.000000000000000001),  100.0000000, 0);
    79         assertEquals(LatLon.roundToOsmPrecision(100.0000000000000000001),  100.0000000, 0);
    80         assertEquals(LatLon.roundToOsmPrecision(100.00000000000000000001),  100.0000000, 0);
     72        assertEquals(LatLon.roundToOsmPrecision(100.00000001), 100.0000000, 0);
     73        assertEquals(LatLon.roundToOsmPrecision(100.000000001), 100.0000000, 0);
     74        assertEquals(LatLon.roundToOsmPrecision(100.0000000001), 100.0000000, 0);
     75        assertEquals(LatLon.roundToOsmPrecision(100.00000000001), 100.0000000, 0);
     76        assertEquals(LatLon.roundToOsmPrecision(100.000000000001), 100.0000000, 0);
     77        assertEquals(LatLon.roundToOsmPrecision(100.0000000000001), 100.0000000, 0);
     78        assertEquals(LatLon.roundToOsmPrecision(100.00000000000001), 100.0000000, 0);
     79        assertEquals(LatLon.roundToOsmPrecision(100.000000000000001), 100.0000000, 0);
     80        assertEquals(LatLon.roundToOsmPrecision(100.0000000000000001), 100.0000000, 0);
     81        assertEquals(LatLon.roundToOsmPrecision(100.00000000000000001), 100.0000000, 0);
     82        assertEquals(LatLon.roundToOsmPrecision(100.000000000000000001), 100.0000000, 0);
     83        assertEquals(LatLon.roundToOsmPrecision(100.0000000000000000001), 100.0000000, 0);
     84        assertEquals(LatLon.roundToOsmPrecision(100.00000000000000000001), 100.0000000, 0);
    8185
    82         assertEquals(LatLon.roundToOsmPrecision(99.999999999999999999999),  100.0000000, 0);
    83         assertEquals(LatLon.roundToOsmPrecision(99.99999999999999999999),  100.0000000, 0);
    84         assertEquals(LatLon.roundToOsmPrecision(99.9999999999999999999),  100.0000000, 0);
    85         assertEquals(LatLon.roundToOsmPrecision(99.999999999999999999),  100.0000000, 0);
    86         assertEquals(LatLon.roundToOsmPrecision(99.99999999999999999),  100.0000000, 0);
    87         assertEquals(LatLon.roundToOsmPrecision(99.9999999999999999),  100.0000000, 0);
    88         assertEquals(LatLon.roundToOsmPrecision(99.999999999999999),  100.0000000, 0);
    89         assertEquals(LatLon.roundToOsmPrecision(99.99999999999999),  100.0000000, 0);
    90         assertEquals(LatLon.roundToOsmPrecision(99.9999999999999),  100.0000000, 0);
    91         assertEquals(LatLon.roundToOsmPrecision(99.999999999999),  100.0000000, 0);
    92         assertEquals(LatLon.roundToOsmPrecision(99.99999999999),  100.0000000, 0);
    93         assertEquals(LatLon.roundToOsmPrecision(99.9999999999),  100.0000000, 0);
    94         assertEquals(LatLon.roundToOsmPrecision(99.999999999),  100.0000000, 0);
    95         assertEquals(LatLon.roundToOsmPrecision(99.99999999),  100.0000000, 0);
    96         assertEquals(LatLon.roundToOsmPrecision(99.9999999),  99.9999999, 0);
     86        assertEquals(LatLon.roundToOsmPrecision(99.999999999999999999999), 100.0000000, 0);
     87        assertEquals(LatLon.roundToOsmPrecision(99.99999999999999999999), 100.0000000, 0);
     88        assertEquals(LatLon.roundToOsmPrecision(99.9999999999999999999), 100.0000000, 0);
     89        assertEquals(LatLon.roundToOsmPrecision(99.999999999999999999), 100.0000000, 0);
     90        assertEquals(LatLon.roundToOsmPrecision(99.99999999999999999), 100.0000000, 0);
     91        assertEquals(LatLon.roundToOsmPrecision(99.9999999999999999), 100.0000000, 0);
     92        assertEquals(LatLon.roundToOsmPrecision(99.999999999999999), 100.0000000, 0);
     93        assertEquals(LatLon.roundToOsmPrecision(99.99999999999999), 100.0000000, 0);
     94        assertEquals(LatLon.roundToOsmPrecision(99.9999999999999), 100.0000000, 0);
     95        assertEquals(LatLon.roundToOsmPrecision(99.999999999999), 100.0000000, 0);
     96        assertEquals(LatLon.roundToOsmPrecision(99.99999999999), 100.0000000, 0);
     97        assertEquals(LatLon.roundToOsmPrecision(99.9999999999), 100.0000000, 0);
     98        assertEquals(LatLon.roundToOsmPrecision(99.999999999), 100.0000000, 0);
     99        assertEquals(LatLon.roundToOsmPrecision(99.99999999), 100.0000000, 0);
     100        assertEquals(LatLon.roundToOsmPrecision(99.9999999), 99.9999999, 0);
    97101    }
    98102
  • trunk/test/unit/org/openstreetmap/josm/data/imagery/ImageryInfoTest.java

    r10221 r10378  
    3636    @Test
    3737    public void testGetExtendedUrl() {
    38         ImageryInfo testImageryTMS =  new ImageryInfo("test imagery", "http://localhost", "tms", null, null);
     38        ImageryInfo testImageryTMS = new ImageryInfo("test imagery", "http://localhost", "tms", null, null);
    3939        testImageryTMS.setDefaultMinZoom(16);
    4040        testImageryTMS.setDefaultMaxZoom(23);
  • trunk/test/unit/org/openstreetmap/josm/data/imagery/TemplatedWMSTileSourceTest.java

    r10221 r10378  
    2323public class TemplatedWMSTileSourceTest {
    2424
    25     private ImageryInfo testImageryWMS =  new ImageryInfo("test imagery", "http://localhost", "wms", null, null);
    26     private ImageryInfo testImageryTMS =  new ImageryInfo("test imagery", "http://localhost", "tms", null, null);
     25    private ImageryInfo testImageryWMS = new ImageryInfo("test imagery", "http://localhost", "wms", null, null);
     26    private ImageryInfo testImageryTMS = new ImageryInfo("test imagery", "http://localhost", "tms", null, null);
    2727
    2828    /**
     
    190190    private static boolean isWithin(EastNorth point, EastNorth topLeft, EastNorth bottomRight) {
    191191        return Math.min(topLeft.east(), bottomRight.east()) <= point.east() &&
    192                 point.east() <= Math.max(topLeft.east(), bottomRight.east())  &&
     192                point.east() <= Math.max(topLeft.east(), bottomRight.east()) &&
    193193                Math.min(topLeft.north(), bottomRight.north()) <= point.north() &&
    194194                point.north() <= Math.max(topLeft.north(), bottomRight.north());
  • trunk/test/unit/org/openstreetmap/josm/data/imagery/WMTSTileSourceTest.java

    r10221 r10378  
    2525public class WMTSTileSourceTest {
    2626
    27     private ImageryInfo testImageryTMS =  new ImageryInfo("test imagery", "http://localhost", "tms", null, null);
     27    private ImageryInfo testImageryTMS = new ImageryInfo("test imagery", "http://localhost", "tms", null, null);
    2828    private ImageryInfo testImageryPSEUDO_MERCATOR = getImagery(TestUtils.getTestDataRoot() + "wmts/getcapabilities-pseudo-mercator.xml");
    2929    private ImageryInfo testImageryTOPO_PL = getImagery(TestUtils.getTestDataRoot() + "wmts/getcapabilities-TOPO.xml");
     
    192192                + "VERSION=1.0.0&LAYER=MAPA TOPOGRAFICZNA&STYLE=default&FORMAT=image/jpeg&tileMatrixSet=EPSG:4326&"
    193193                + "tileMatrix=EPSG:4326:0&tileRow=1&tileCol=1",
    194                 testSource.getTileUrl(0,  1, 1));
     194                testSource.getTileUrl(0, 1, 1));
    195195    }
    196196
     
    221221        assertEquals(
    222222                "http://www.ngi.be/cartoweb/1.0.0/topo/default/3857/7/1/1.png",
    223                 testSource.getTileUrl(0,  1, 1));
     223                testSource.getTileUrl(0, 1, 1));
    224224    }
    225225
     
    232232        verifyTile(new LatLon(45.4105023, -75.7153702), testSource, 303751, 375502, 12);
    233233        verifyTile(new LatLon(45.4601306, -75.7617187), testSource, 1186, 1466, 4);
    234 
    235234    }
    236235
  • trunk/test/unit/org/openstreetmap/josm/data/osm/DataSetMergerTest.java

    r9979 r10378  
    88import static org.junit.Assert.assertSame;
    99import static org.junit.Assert.assertTrue;
     10import static org.junit.Assert.fail;
    1011
    1112import java.io.StringWriter;
     
    5354    }
    5455
    55     private void runConsistencyTests(DataSet ds) throws Exception {
     56    private void runConsistencyTests(DataSet ds) {
    5657        StringWriter writer = new StringWriter();
    57         DatasetConsistencyTest test =  new DatasetConsistencyTest(ds, writer);
     58        DatasetConsistencyTest test = new DatasetConsistencyTest(ds, writer);
    5859        test.checkReferrers();
    5960        test.checkCompleteWaysWithIncompleteNodes();
     
    6364        test.checkZeroNodesWays();
    6465        String result = writer.toString();
    65         if (result.length() > 0)
    66             throw new RuntimeException(result);
     66        if (!result.isEmpty())
     67            fail(result);
    6768    }
    6869
    6970    @After
    70     public void checkDatasets() throws Exception {
     71    public void checkDatasets() {
    7172        runConsistencyTests(my);
    7273        runConsistencyTests(their);
  • trunk/test/unit/org/openstreetmap/josm/data/osm/history/HistoryRelationTest.java

    r9666 r10378  
    8080        rel2.addMember(new RelationMemberData(null, OsmPrimitiveType.NODE, 2));
    8181
     82        // CHECKSTYLE.OFF: SingleSpaceSeparator
    8283        assertEquals("relation (1, 0 members)", rel0.getDisplayName(hnf));
    8384        assertEquals("relation (1, 1 member)",  rel1.getDisplayName(hnf));
     
    9495        assertEquals("relation (\"RelName\", 1 member)",  rel1.getDisplayName(hnf));
    9596        assertEquals("relation (\"RelName\", 2 members)", rel2.getDisplayName(hnf));
     97        // CHECKSTYLE.ON: SingleSpaceSeparator
    9698    }
    9799}
  • trunk/test/unit/org/openstreetmap/josm/data/osm/history/HistoryWayTest.java

    r9203 r10378  
    122122        way2.addNode(2);
    123123
     124        // CHECKSTYLE.OFF: SingleSpaceSeparator
    124125        assertEquals("1 (0 nodes)", way0.getDisplayName(hnf));
    125126        assertEquals("1 (1 node)",  way1.getDisplayName(hnf));
     
    136137        assertEquals("WayName (1 node)",  way1.getDisplayName(hnf));
    137138        assertEquals("WayName (2 nodes)", way2.getDisplayName(hnf));
     139        // CHECKSTYLE.ON: SingleSpaceSeparator
    138140    }
    139141}
  • trunk/test/unit/org/openstreetmap/josm/data/osm/visitor/MergeSourceBuildingVisitorTest.java

    r10202 r10378  
    169169        r1.addMember(new RelationMember("node-20", n20));
    170170        Way w30 = new Way(30, 1);
    171         Node n21  = new Node(21);
     171        Node n21 = new Node(21);
    172172        w30.addNode(n21);
    173173        Node n22 = new Node(22);
  • trunk/test/unit/org/openstreetmap/josm/data/projection/SwissGridTest.java

    r8836 r10378  
    2525
    2626    // CHECKSTYLE.OFF: LineLength
     27    // CHECKSTYLE.OFF: SingleSpaceSeparator
    2728
    2829    /**
     
    3031     */
    3132    ProjData[] data = {
    32             new ProjData("Zimmerwald",      d(7, 27, 54.983506), d(46, 52, 37.540562), 947.149, 602030.680, 191775.030, 897.915),
    33             new ProjData("Chrischona",      d(7, 40, 6.983077), d(47, 34, 1.385301), 504.935,  617306.300, 268507.300, 456.064),
    34             new ProjData("Pfaender",        d(9, 47, 3.697723), d(47, 30, 55.172797), 1089.372, 776668.105, 265372.681, 1042.624),
    35             new ProjData("La Givrine",      d(6, 6, 7.326361), d(46, 27, 14.690021), 1258.274,  497313.292, 145625.438, 1207.434),
    36             new ProjData("Monte Generoso",  d(9, 1, 16.389053), d(45, 55, 45.438020), 1685.027, 722758.810, 87649.670, 1636.600) };
    37 
     33            new ProjData("Zimmerwald",     d(7, 27, 54.983506), d(46, 52, 37.540562), 947.149, 602030.680, 191775.030, 897.915),
     34            new ProjData("Chrischona",     d(7, 40, 6.983077), d(47, 34, 1.385301), 504.935,  617306.300, 268507.300, 456.064),
     35            new ProjData("Pfaender",       d(9, 47, 3.697723), d(47, 30, 55.172797), 1089.372, 776668.105, 265372.681, 1042.624),
     36            new ProjData("La Givrine",     d(6, 6, 7.326361), d(46, 27, 14.690021), 1258.274,  497313.292, 145625.438, 1207.434),
     37            new ProjData("Monte Generoso", d(9, 1, 16.389053), d(45, 55, 45.438020), 1685.027, 722758.810, 87649.670, 1636.600) };
     38
     39    // CHECKSTYLE.ON: SingleSpaceSeparator
    3840    // CHECKSTYLE.ON: LineLength
    3941
  • trunk/test/unit/org/openstreetmap/josm/data/validation/routines/EmailValidatorTest.java

    r10338 r10378  
    5858     */
    5959    @Test
    60     public void testEmail()  {
     60    public void testEmail() {
    6161        assertTrue(validator.isValid("jsmith@apache.org"));
    6262        assertFalse(validator.isValid(null));
     
    6767     */
    6868    @Test
    69     public void testEmailWithNumericAddress()  {
     69    public void testEmailWithNumericAddress() {
    7070        assertTrue(validator.isValid("someone@[216.109.118.76]"));
    7171        assertTrue(validator.isValid("someone@yahoo.com"));
     
    7676     */
    7777    @Test
    78     public void testEmailExtension()  {
     78    public void testEmailExtension() {
    7979        assertTrue(validator.isValid("jsmith@apache.org"));
    8080
     
    9999     */
    100100    @Test
    101     public void testEmailWithDash()  {
     101    public void testEmailWithDash() {
    102102        assertTrue(validator.isValid("andy.noble@data-workshop.com"));
    103103
     
    114114     */
    115115    @Test
    116     public void testEmailWithDotEnd()  {
     116    public void testEmailWithDotEnd() {
    117117        assertFalse(validator.isValid("andy.noble@data-workshop.com."));
    118118    }
     
    123123     */
    124124    @Test
    125     public void testEmailWithBogusCharacter()  {
     125    public void testEmailWithBogusCharacter() {
    126126
    127127        assertFalse(validator.isValid("andy.noble@\u008fdata-workshop.com"));
     
    184184     */
    185185    @Test
    186     public void testEmailWithCommas()  {
     186    public void testEmailWithCommas() {
    187187        assertFalse(validator.isValid("joeblow@apa,che.org"));
    188188
     
    196196     */
    197197    @Test
    198     public void testEmailWithSpaces()  {
     198    public void testEmailWithSpaces() {
    199199        assertFalse(validator.isValid("joeblow @apache.org")); // TODO - this should be valid?
    200200
     
    215215     */
    216216    @Test
    217     public void testEmailWithControlChars()  {
     217    public void testEmailWithControlChars() {
    218218        for (char c = 0; c < 32; c++) {
    219219            assertFalse("Test control char " + ((int) c), validator.isValid("foo" + c + "bar@domain.com"));
     
    278278     */
    279279    @Test
    280     public void testEmailUserName()  {
     280    public void testEmailUserName() {
    281281
    282282        assertTrue(validator.isValid("joe1blow@apache.org"));
     
    492492    @Ignore("This test fails so disable it for 1.1.4 release. The real solution is to fix the email parsing")
    493493    @Test
    494     public void testEmailFromPerl()  {
     494    public void testEmailFromPerl() {
    495495        for (int index = 0; index < testEmailFromPerl.length; index++) {
    496496            String item = testEmailFromPerl[index].item;
  • trunk/test/unit/org/openstreetmap/josm/data/validation/routines/InetAddressValidatorTest.java

    r10338 r10378  
    4747    @Test
    4848    public void testInetAddressesFromTheWild() {
    49         assertTrue("www.apache.org IP should be valid",       validator.isValid("140.211.11.130"));
    50         assertTrue("www.l.google.com IP should be valid",     validator.isValid("72.14.253.103"));
    51         assertTrue("fsf.org IP should be valid",              validator.isValid("199.232.41.5"));
    52         assertTrue("appscs.ign.com IP should be valid",       validator.isValid("216.35.123.87"));
     49        // CHECKSTYLE.OFF: SingleSpaceSeparator
     50        assertTrue("www.apache.org IP should be valid",   validator.isValid("140.211.11.130"));
     51        assertTrue("www.l.google.com IP should be valid", validator.isValid("72.14.253.103"));
     52        assertTrue("fsf.org IP should be valid",          validator.isValid("199.232.41.5"));
     53        assertTrue("appscs.ign.com IP should be valid",   validator.isValid("216.35.123.87"));
     54        // CHECKSTYLE.ON: SingleSpaceSeparator
    5355    }
    5456
     
    6769    @Test
    6870    public void testInetAddressesByClass() {
    69         assertTrue("class A IP should be valid",              validator.isValid("24.25.231.12"));
    70         assertFalse("illegal class A IP should be invalid",   validator.isValid("2.41.32.324"));
    71 
    72         assertTrue("class B IP should be valid",              validator.isValid("135.14.44.12"));
    73         assertFalse("illegal class B IP should be invalid",   validator.isValid("154.123.441.123"));
    74 
    75         assertTrue("class C IP should be valid",              validator.isValid("213.25.224.32"));
    76         assertFalse("illegal class C IP should be invalid",   validator.isValid("201.543.23.11"));
    77 
    78         assertTrue("class D IP should be valid",              validator.isValid("229.35.159.6"));
    79         assertFalse("illegal class D IP should be invalid",   validator.isValid("231.54.11.987"));
    80 
    81         assertTrue("class E IP should be valid",              validator.isValid("248.85.24.92"));
    82         assertFalse("illegal class E IP should be invalid",   validator.isValid("250.21.323.48"));
     71        // CHECKSTYLE.OFF: SingleSpaceSeparator
     72        assertTrue("class A IP should be valid",            validator.isValid("24.25.231.12"));
     73        assertFalse("illegal class A IP should be invalid", validator.isValid("2.41.32.324"));
     74
     75        assertTrue("class B IP should be valid",            validator.isValid("135.14.44.12"));
     76        assertFalse("illegal class B IP should be invalid", validator.isValid("154.123.441.123"));
     77
     78        assertTrue("class C IP should be valid",            validator.isValid("213.25.224.32"));
     79        assertFalse("illegal class C IP should be invalid", validator.isValid("201.543.23.11"));
     80
     81        assertTrue("class D IP should be valid",            validator.isValid("229.35.159.6"));
     82        assertFalse("illegal class D IP should be invalid", validator.isValid("231.54.11.987"));
     83
     84        assertTrue("class E IP should be valid",            validator.isValid("248.85.24.92"));
     85        assertFalse("illegal class E IP should be invalid", validator.isValid("250.21.323.48"));
     86        // CHECKSTYLE.ON: SingleSpaceSeparator
    8387    }
    8488
     
    8892    @Test
    8993    public void testReservedInetAddresses() {
    90         assertTrue("localhost IP should be valid",            validator.isValid("127.0.0.1"));
    91         assertTrue("broadcast IP should be valid",            validator.isValid("255.255.255.255"));
     94        assertTrue("localhost IP should be valid", validator.isValid("127.0.0.1"));
     95        assertTrue("broadcast IP should be valid", validator.isValid("255.255.255.255"));
    9296    }
    9397
     
    97101    @Test
    98102    public void testBrokenInetAddresses() {
     103        // CHECKSTYLE.OFF: SingleSpaceSeparator
    99104        assertFalse("IP with characters should be invalid",     validator.isValid("124.14.32.abc"));
    100105        assertFalse("IP with leading zeroes should be invalid", validator.isValid("124.14.32.01"));
    101106        assertFalse("IP with three groups should be invalid",   validator.isValid("23.64.12"));
    102107        assertFalse("IP with five groups should be invalid",    validator.isValid("26.34.23.77.234"));
     108        // CHECKSTYLE.ON: SingleSpaceSeparator
    103109    }
    104110
  • trunk/test/unit/org/openstreetmap/josm/data/validation/routines/RegexValidatorTest.java

    r10338 r10378  
    3737public class RegexValidatorTest {
    3838
    39     private static final String REGEX         = "^([abc]*)(?:\\-)([DEF]*)(?:\\-)([123]*)$";
     39    private static final String REGEX = "^([abc]*)(?:\\-)([DEF]*)(?:\\-)([123]*)$";
    4040
    4141    private static final String COMPONENT_1 = "([abc]{3})";
    4242    private static final String COMPONENT_2 = "([DEF]{3})";
    4343    private static final String COMPONENT_3 = "([123]{3})";
    44     private static final String SEPARATOR_1  = "(?:\\-)";
    45     private static final String SEPARATOR_2  = "(?:\\s)";
     44    private static final String SEPARATOR_1 = "(?:\\-)";
     45    private static final String SEPARATOR_2 = "(?:\\s)";
    4646    private static final String REGEX_1 = "^" + COMPONENT_1 + SEPARATOR_1 + COMPONENT_2 + SEPARATOR_1 + COMPONENT_3 + "$";
    4747    private static final String REGEX_2 = "^" + COMPONENT_1 + SEPARATOR_2 + COMPONENT_2 + SEPARATOR_2 + COMPONENT_3 + "$";
    4848    private static final String REGEX_3 = "^" + COMPONENT_1 + COMPONENT_2 + COMPONENT_3 + "$";
    4949    private static final String[] MULTIPLE_REGEX = new String[] {REGEX_1, REGEX_2, REGEX_3};
     50
     51    // CHECKSTYLE.OFF: SingleSpaceSeparator
    5052
    5153    /**
     
    8587
    8688        // ------------ Set up Sensitive Validators
    87         RegexValidator multiple   = new RegexValidator(MULTIPLE_REGEX);
    88         RegexValidator single1   = new RegexValidator(REGEX_1);
    89         RegexValidator single2   = new RegexValidator(REGEX_2);
    90         RegexValidator single3   = new RegexValidator(REGEX_3);
     89        RegexValidator multiple = new RegexValidator(MULTIPLE_REGEX);
     90        RegexValidator single1  = new RegexValidator(REGEX_1);
     91        RegexValidator single2  = new RegexValidator(REGEX_2);
     92        RegexValidator single3  = new RegexValidator(REGEX_3);
    9193
    9294        // ------------ Set up test values
     
    128130        // ------------ Set up In-sensitive Validators
    129131        RegexValidator multiple = new RegexValidator(MULTIPLE_REGEX, false);
    130         RegexValidator single1   = new RegexValidator(REGEX_1, false);
    131         RegexValidator single2   = new RegexValidator(REGEX_2, false);
    132         RegexValidator single3   = new RegexValidator(REGEX_3, false);
     132        RegexValidator single1  = new RegexValidator(REGEX_1, false);
     133        RegexValidator single2  = new RegexValidator(REGEX_2, false);
     134        RegexValidator single3  = new RegexValidator(REGEX_3, false);
    133135
    134136        // ------------ Set up test values
     
    172174        assertNull("Instance match()",    validator.match(null));
    173175    }
     176
     177    // CHECKSTYLE.ON: SingleSpaceSeparator
    174178
    175179    /**
  • trunk/test/unit/org/openstreetmap/josm/data/validation/routines/UrlValidatorTest.java

    r10338 r10378  
    9999      int statusPerLine = 60;
    100100      int printed = 0;
    101       if (printIndex)  {
     101      if (printIndex) {
    102102         statusPerLine = 6;
    103103      }
  • trunk/test/unit/org/openstreetmap/josm/gui/DefaultNameFormatterTest.java

    r10222 r10378  
    7070            System.out.println("p3: "+DefaultNameFormatter.getInstance().format(p3)+" - "+p3);
    7171
     72            // CHECKSTYLE.OFF: SingleSpaceSeparator
    7273            assertEquals(comparator.compare(p1, p2), -1); // p1 < p2
    7374            assertEquals(comparator.compare(p2, p1),  1); // p2 > p1
     
    7778            assertEquals(comparator.compare(p2, p3),  1); // p2 > p3
    7879            assertEquals(comparator.compare(p3, p2), -1); // p3 < p2
     80            // CHECKSTYLE.ON: SingleSpaceSeparator
    7981
    8082            Relation[] relations = new ArrayList<>(ds.getRelations()).toArray(new Relation[0]);
  • trunk/test/unit/org/openstreetmap/josm/gui/layer/LayerManagerTest.java

    r10278 r10378  
    128128     */
    129129    @Before
    130     public void setUp()   {
     130    public void setUp() {
    131131        layerManager = new LayerManager();
    132132    }
  • trunk/test/unit/org/openstreetmap/josm/gui/layer/markerlayer/MarkerLayerTest.java

    r10050 r10378  
    3737     */
    3838    @Test
    39     public void testMarkerLayer()  {
     39    public void testMarkerLayer() {
    4040        assertEquals(Color.magenta, MarkerLayer.getGenericColor());
    4141        MarkerLayer layer = new MarkerLayer(new GpxData(), "foo", null, null);
  • trunk/test/unit/org/openstreetmap/josm/gui/preferences/advanced/AdvancedPreferenceTest.java

    r9973 r10378  
    2626     */
    2727    @Test
    28     public void testAdvancedPreference()  {
     28    public void testAdvancedPreference() {
    2929        assertNotNull(new AdvancedPreference.Factory().createPreferenceSetting());
    3030    }
  • trunk/test/unit/org/openstreetmap/josm/gui/preferences/advanced/ExportProfileActionTest.java

    r9845 r10378  
    2424     */
    2525    @Test
    26     public void testAction()  {
     26    public void testAction() {
    2727        new ExportProfileAction(Main.pref, "foo", "bar").actionPerformed(null);
    2828        new ExportProfileAction(Main.pref, "expert", "expert").actionPerformed(null);
  • trunk/test/unit/org/openstreetmap/josm/gui/preferences/advanced/ListEditorTest.java

    r10047 r10378  
    3030     */
    3131    @Test
    32     public void testListSettingTableModel()  {
     32    public void testListSettingTableModel() {
    3333        ListSettingTableModel model = new ListSettingTableModel(null);
    3434        assertNotNull(model.getData());
  • trunk/test/unit/org/openstreetmap/josm/gui/preferences/advanced/PrefEntryTest.java

    r9943 r10378  
    3030     */
    3131    @Test
    32     public void testPrefEntry()  {
     32    public void testPrefEntry() {
    3333        String key = "key";
    3434        StringSetting val = new StringSetting("value");
  • trunk/test/unit/org/openstreetmap/josm/gui/preferences/advanced/PreferencesTableTest.java

    r10109 r10378  
    4242     */
    4343    @Test
    44     public void testPreferencesTable()  {
     44    public void testPreferencesTable() {
    4545        PreferencesTable t = newTable();
    4646        t.fireDataChanged();
     
    5555     */
    5656    @Test
    57     public void testAllSettingsTableModel()  {
     57    public void testAllSettingsTableModel() {
    5858        AllSettingsTableModel model = (AllSettingsTableModel) newTable().getModel();
    5959        assertEquals(1, model.getRowCount());
  • trunk/test/unit/org/openstreetmap/josm/gui/preferences/audio/AudioPreferenceTest.java

    r10103 r10378  
    2727     */
    2828    @Test
    29     public void testAudioPreference()  {
     29    public void testAudioPreference() {
    3030        assertNotNull(new AudioPreference.Factory().createPreferenceSetting());
    3131    }
  • trunk/test/unit/org/openstreetmap/josm/gui/preferences/display/ColorPreferenceTest.java

    r9973 r10378  
    2626     */
    2727    @Test
    28     public void testColorPreference()  {
     28    public void testColorPreference() {
    2929        assertNotNull(new ColorPreference.Factory().createPreferenceSetting());
    3030    }
  • trunk/test/unit/org/openstreetmap/josm/gui/preferences/display/DisplayPreferenceTest.java

    r9973 r10378  
    2626     */
    2727    @Test
    28     public void testDisplayPreference()  {
     28    public void testDisplayPreference() {
    2929        assertNotNull(new DisplayPreference.Factory().createPreferenceSetting());
    3030    }
  • trunk/test/unit/org/openstreetmap/josm/gui/preferences/display/DrawingPreferenceTest.java

    r9973 r10378  
    2626     */
    2727    @Test
    28     public void testDrawingPreference()  {
     28    public void testDrawingPreference() {
    2929        assertNotNull(new DrawingPreference.Factory().createPreferenceSetting());
    3030    }
  • trunk/test/unit/org/openstreetmap/josm/gui/preferences/display/LafPreferenceTest.java

    r9973 r10378  
    2626     */
    2727    @Test
    28     public void testLafPreference()  {
     28    public void testLafPreference() {
    2929        assertNotNull(new LafPreference.Factory().createPreferenceSetting());
    3030    }
  • trunk/test/unit/org/openstreetmap/josm/gui/preferences/display/LanguagePreferenceTest.java

    r9973 r10378  
    2626     */
    2727    @Test
    28     public void testLanguagePreference()  {
     28    public void testLanguagePreference() {
    2929        assertNotNull(new LanguagePreference.Factory().createPreferenceSetting());
    3030    }
  • trunk/test/unit/org/openstreetmap/josm/gui/preferences/imagery/ImageryPreferenceTest.java

    r9973 r10378  
    2626     */
    2727    @Test
    28     public void testImageryPreference()  {
     28    public void testImageryPreference() {
    2929        assertNotNull(new ImageryPreference.Factory().createPreferenceSetting());
    3030    }
  • trunk/test/unit/org/openstreetmap/josm/gui/preferences/map/BackupPreferenceTest.java

    r9973 r10378  
    2626     */
    2727    @Test
    28     public void testBackupPreference()  {
     28    public void testBackupPreference() {
    2929        assertNotNull(new BackupPreference.Factory().createPreferenceSetting());
    3030    }
  • trunk/test/unit/org/openstreetmap/josm/gui/preferences/map/MapPaintPreferenceTest.java

    r9973 r10378  
    2626     */
    2727    @Test
    28     public void testMapPaintPreference()  {
     28    public void testMapPaintPreference() {
    2929        assertNotNull(new MapPaintPreference.Factory().createPreferenceSetting());
    3030    }
  • trunk/test/unit/org/openstreetmap/josm/gui/preferences/map/MapPreferenceTest.java

    r9973 r10378  
    2626     */
    2727    @Test
    28     public void testMapPreference()  {
     28    public void testMapPreference() {
    2929        assertNotNull(new MapPreference.Factory().createPreferenceSetting());
    3030    }
  • trunk/test/unit/org/openstreetmap/josm/gui/preferences/map/TaggingPresetPreferenceTest.java

    r9973 r10378  
    2626     */
    2727    @Test
    28     public void testTaggingPresetPreference()  {
     28    public void testTaggingPresetPreference() {
    2929        assertNotNull(new TaggingPresetPreference.Factory().createPreferenceSetting());
    3030    }
  • trunk/test/unit/org/openstreetmap/josm/gui/preferences/plugin/PluginPreferenceTest.java

    r9973 r10378  
    3636     */
    3737    @Test
    38     public void testPluginPreference()  {
     38    public void testPluginPreference() {
    3939        assertNotNull(new PluginPreference.Factory().createPreferenceSetting());
    4040    }
     
    4545     */
    4646    @Test
    47     public void testBuildDownloadSummary() throws Exception  {
     47    public void testBuildDownloadSummary() throws Exception {
    4848        final PluginInformation dummy = new PluginInformation(
    4949                new File(TestUtils.getTestDataRoot() + "plugin/dummy_plugin.jar"), "dummy_plugin");
  • trunk/test/unit/org/openstreetmap/josm/gui/preferences/projection/ProjectionPreferenceTest.java

    r9973 r10378  
    2727     */
    2828    @Test
    29     public void testProjectionPreference()  {
     29    public void testProjectionPreference() {
    3030        assertNotNull(new ProjectionPreference.Factory().createPreferenceSetting());
    3131    }
  • trunk/test/unit/org/openstreetmap/josm/gui/preferences/remotecontrol/RemoteControlPreferenceTest.java

    r9973 r10378  
    2626     */
    2727    @Test
    28     public void testRemoteControlPreference()  {
     28    public void testRemoteControlPreference() {
    2929        assertNotNull(new RemoteControlPreference.Factory().createPreferenceSetting());
    3030    }
  • trunk/test/unit/org/openstreetmap/josm/gui/preferences/server/AuthenticationPreferenceTest.java

    r9973 r10378  
    2626     */
    2727    @Test
    28     public void testAuthenticationPreference()  {
     28    public void testAuthenticationPreference() {
    2929        assertNotNull(new AuthenticationPreference.Factory().createPreferenceSetting());
    3030    }
  • trunk/test/unit/org/openstreetmap/josm/gui/preferences/server/OverpassServerPreferenceTest.java

    r9973 r10378  
    2626     */
    2727    @Test
    28     public void testOverpassServerPreference()  {
     28    public void testOverpassServerPreference() {
    2929        assertNotNull(new OverpassServerPreference.Factory().createPreferenceSetting());
    3030    }
  • trunk/test/unit/org/openstreetmap/josm/gui/preferences/server/ProxyPreferenceTest.java

    r9973 r10378  
    2626     */
    2727    @Test
    28     public void testProxyPreference()  {
     28    public void testProxyPreference() {
    2929        assertNotNull(new ProxyPreference.Factory().createPreferenceSetting());
    3030    }
  • trunk/test/unit/org/openstreetmap/josm/gui/preferences/server/ServerAccessPreferenceTest.java

    r9973 r10378  
    2626     */
    2727    @Test
    28     public void testServerAccessPreference()  {
     28    public void testServerAccessPreference() {
    2929        assertNotNull(new ServerAccessPreference.Factory().createPreferenceSetting());
    3030    }
  • trunk/test/unit/org/openstreetmap/josm/gui/preferences/shortcut/ShortcutPreferenceTest.java

    r9973 r10378  
    2626     */
    2727    @Test
    28     public void testShortcutPreference()  {
     28    public void testShortcutPreference() {
    2929        assertNotNull(new ShortcutPreference.Factory().createPreferenceSetting());
    3030    }
  • trunk/test/unit/org/openstreetmap/josm/gui/preferences/validator/ValidatorPreferenceTest.java

    r9973 r10378  
    2626     */
    2727    @Test
    28     public void testValidatorPreference()  {
     28    public void testValidatorPreference() {
    2929        assertNotNull(new ValidatorPreference.Factory().createPreferenceSetting());
    3030    }
  • trunk/test/unit/org/openstreetmap/josm/gui/preferences/validator/ValidatorTestsPreferenceTest.java

    r9973 r10378  
    2626     */
    2727    @Test
    28     public void testValidatorTestsPreference()  {
     28    public void testValidatorTestsPreference() {
    2929        assertNotNull(new ValidatorTestsPreference.Factory().createPreferenceSetting());
    3030    }
  • trunk/test/unit/org/openstreetmap/josm/gui/tagging/presets/TaggingPresetReaderTest.java

    r10222 r10378  
    5858        final Collection<TaggingPreset> presets = TaggingPresetReader.readAll(TestUtils.getTestDataRoot() + "preset_chunk.xml", true);
    5959        assertThat(presets, hasSize(1));
    60         final TaggingPreset abc =  presets.iterator().next();
     60        final TaggingPreset abc = presets.iterator().next();
    6161        final List<String> keys = Utils.transform(abc.data, new Utils.Function<TaggingPresetItem, String>() {
    6262            @Override
  • trunk/test/unit/org/openstreetmap/josm/tools/PlatformHookOsxTest.java

    r10339 r10378  
    3636     */
    3737    @Test
    38     public void testStartupHook()  {
     38    public void testStartupHook() {
    3939        hook.startupHook();
    4040    }
  • trunk/test/unit/org/openstreetmap/josm/tools/PlatformHookWindowsTest.java

    r10339 r10378  
    4343     */
    4444    @Test
    45     public void testStartupHook()  {
     45    public void testStartupHook() {
    4646        hook.startupHook();
    4747    }
  • trunk/test/unit/org/openstreetmap/josm/tools/TextTagParserTest.java

    r8857 r10378  
    3030    public void testUnescape() {
    3131        String s, s1;
    32         s = "\"2 3 4\"";       s1 = "2 3 4";
     32        s = "\"2 3 4\"";
     33        s1 = "2 3 4";
    3334        Assert.assertEquals(s1, TextTagParser.unescape(s));
    3435
    35         s = "\"2 \\\"3\\\" 4\"";       s1 = "2 \"3\" 4";
     36        s = "\"2 \\\"3\\\" 4\"";
     37        s1 = "2 \"3\" 4";
    3638        Assert.assertEquals(s1, TextTagParser.unescape(s));
    3739
    38         s = "\"2 3 ===4===\"";       s1 = "2 3 ===4===";
     40        s = "\"2 3 ===4===\"";
     41        s1 = "2 3 ===4===";
    3942        Assert.assertEquals(s1, TextTagParser.unescape(s));
    4043
    41         s = "\"2 3 \\\\\\\\===4===\"";       s1 = "2 3 \\\\===4===";
     44        s = "\"2 3 \\\\\\\\===4===\"";
     45        s1 = "2 3 \\\\===4===";
    4246        Assert.assertEquals(s1, TextTagParser.unescape(s));
    4347    }
  • trunk/test/unit/org/openstreetmap/josm/tools/UtilsTest.java

    r9274 r10378  
    2424    @Test
    2525    public void testStrip() {
     26        // CHECKSTYLE.OFF: SingleSpaceSeparator
    2627        final String someWhite =
    2728            "\u00A0"+ // SPACE_SEPARATOR
     
    4243            "\uFEFF"+ // ZERO WIDTH NO-BREAK SPACE
    4344            "\u3000"; // IDEOGRAPHIC SPACE
     45        // CHECKSTYLE.ON: SingleSpaceSeparator
    4446        Assert.assertNull(Utils.strip(null));
    4547        Assert.assertEquals("", Utils.strip(""));
Note: See TracChangeset for help on using the changeset viewer.