Ignore:
Timestamp:
2015-05-21T01:18:35+02:00 (5 years ago)
Author:
Don-vip
Message:

When doing a String.toLowerCase()/toUpperCase() call, use a Locale. This avoids problems with certain locales, i.e. Lithuanian or Turkish. See PMD UseLocaleWithCaseConversions rule and String.toLowerCase() javadoc.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/util/RotationAngle.java

    r8394 r8404  
    11// License: GPL. For details, see LICENSE file.
    22package org.openstreetmap.josm.gui.util;
     3
     4import java.util.Locale;
    35
    46import org.openstreetmap.josm.data.osm.Node;
     
    5557     */
    5658    public static double parseCardinalRotation(final String cardinal) {
    57         switch (cardinal.toLowerCase()) {
     59        switch (cardinal.toLowerCase(Locale.ENGLISH)) {
    5860            case "n":
    5961            case "north":
Note: See TracChangeset for help on using the changeset viewer.