Ignore:
Timestamp:
2013-10-27T04:06:10+01:00 (10 years ago)
Author:
Don-vip
Message:

Sonar/Findbugs - Format string should use %n rather than \n

File:
1 edited

Legend:

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

    r5554 r6334  
    11// License: GPL. For details, see LICENSE file.
    22package org.openstreetmap.josm.data.projection;
    3 
    4 import static org.openstreetmap.josm.tools.I18n.tr;
    53
    64import java.io.BufferedReader;
     
    108import java.util.Collection;
    119import java.util.HashMap;
    12 import java.util.LinkedHashMap;
    13 import java.util.List;
    1410import java.util.Map;
    1511import java.util.Map.Entry;
     
    6864            {
    6965                EastNorth en = p.latlon2eastNorth(new LatLon(lat, lon));
    70                 String error = String.format("%s (%s): Projecting latlon(%s,%s):\n" +
    71                         "        expected: eastnorth(%s,%s),\n" +
    72                         "        but got:  eastnorth(%s,%s)!\n",
     66                String error = String.format("%s (%s): Projecting latlon(%s,%s):%n" +
     67                        "        expected: eastnorth(%s,%s),%n" +
     68                        "        but got:  eastnorth(%s,%s)!%n",
    7369                        p.toString(), code, lat, lon, east, north, en.east(), en.north());
    7470                double EPSILON = 1e-3; // 1 mm accuracy
     
    7975            {
    8076                LatLon ll = p.eastNorth2latlon(new EastNorth(east, north));
    81                 String error = String.format("%s (%s): Inverse projecting eastnorth(%s,%s):\n" +
    82                         "        expected: latlon(%s,%s),\n" +
    83                         "        but got:  latlon(%s,%s)!\n",
     77                String error = String.format("%s (%s): Inverse projecting eastnorth(%s,%s):%n" +
     78                        "        expected: latlon(%s,%s),%n" +
     79                        "        but got:  latlon(%s,%s)!%n",
    8480                        p.toString(), code, east, north, lat, lon, ll.lat(), ll.lon());
    8581                double EPSILON = Math.toDegrees(1e-3 / 6378137); // 1 mm accuracy (or better)
Note: See TracChangeset for help on using the changeset viewer.