Changeset 10171 in josm


Ignore:
Timestamp:
2016-05-10T01:31:36+02:00 (5 years ago)
Author:
Don-vip
Message:

update to checkstyle 6.18

Location:
trunk
Files:
1 added
1 deleted
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/build.xml

    r10057 r10171  
    653653    <target name="checkstyle" depends="init-properties">
    654654        <taskdef resource="com/puppycrawl/tools/checkstyle/ant/checkstyle-ant-task.properties"
    655              classpath="tools/checkstyle/checkstyle-6.17-all.jar"/>
     655             classpath="tools/checkstyle/checkstyle-6.18-all.jar"/>
    656656        <checkstyle config="tools/checkstyle/josm_checks.xml">
    657657            <fileset dir="${base.dir}/src/org/openstreetmap/josm" includes="**/*.java"
  • trunk/src/org/openstreetmap/josm/io/GeoJSONWriter.java

    r10165 r10171  
    124124        return builder
    125125                .add(BigDecimal.valueOf(c.getX()).setScale(11, RoundingMode.HALF_UP))
    126                 .add(BigDecimal.valueOf(c.getY()).setScale(11, RoundingMode.HALF_UP))
    127                 ;
     126                .add(BigDecimal.valueOf(c.getY()).setScale(11, RoundingMode.HALF_UP));
    128127    }
    129128
  • trunk/test/unit/org/openstreetmap/josm/io/GeoJSONWriterTest.java

    r10165 r10171  
    11// License: GPL. For details, see LICENSE file.
    22package org.openstreetmap.josm.io;
     3
     4import static org.junit.Assert.assertEquals;
    35
    46import org.junit.BeforeClass;
     
    1113import org.openstreetmap.josm.gui.preferences.projection.ProjectionPreference;
    1214
    13 import static org.hamcrest.CoreMatchers.*;
    14 import static org.junit.Assert.*;
    15 
     15/**
     16 * Unit tests of {@link GeoJSONWriter} class.
     17 */
    1618public class GeoJSONWriterTest {
    1719
     
    2426    }
    2527
     28    /**
     29     * Unit test
     30     */
    2631    @Test
    27     public void testPoint() throws Exception {
     32    public void testPoint() {
    2833        final Node node = new Node(new LatLon(12.3, 4.56));
    2934        node.put("name", "foo");
     
    3338        final OsmDataLayer layer = new OsmDataLayer(ds, "foo", null);
    3439        final GeoJSONWriter writer = new GeoJSONWriter(layer, ProjectionPreference.wgs84.getProjection());
    35         assertThat(writer.write().trim(), is(("" +
     40        assertEquals(("" +
    3641                "{\n" +
    3742                "    'type':'FeatureCollection',\n" +
     
    5964                "        }\n" +
    6065                "    ]\n" +
    61                 "}").replace("'", "\"")));
     66                "}").replace("'", "\""), writer.write().trim());
    6267    }
    6368}
Note: See TracChangeset for help on using the changeset viewer.