Ignore:
Timestamp:
2013-09-27T01:16:28+02:00 (11 years ago)
Author:
Don-vip
Message:

Sonar/FindBugs - Performance - Method concatenates strings using + in a loop

File:
1 edited

Legend:

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

    r5556 r6264  
    4848    public void projReferenceTest() {
    4949        Projection swiss = Projections.getProjectionByCode("EPSG:21781"); // Swiss grid
    50         String errs = "";
     50        StringBuilder errs = new StringBuilder();
    5151        for (ProjData pd : data) {
    5252            EastNorth en2 = swiss.latlon2eastNorth(pd.ll);
    5353            if (Math.abs(pd.en.east() - en2.east()) > EPSILON || Math.abs(pd.en.north() - en2.north()) > EPSILON) {
    54                 errs += String.format("%s should be: %s but is: %s\n", pd.name, pd.en, en2);
    55             }
    56         }
    57         assertTrue(errs, errs.length() == 0);
     54                errs.append(String.format("%s should be: %s but is: %s\n", pd.name, pd.en, en2));
     55            }
     56        }
     57        assertTrue(errs.toString(), errs.length() == 0);
    5858    }
    5959
Note: See TracChangeset for help on using the changeset viewer.