Ignore:
Timestamp:
2014-04-19T00:36:43+02:00 (10 years ago)
Author:
Don-vip
Message:

sonar - place Strings literals on the left side when checking for equality (can avoid NPEs)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/projection/datum/NTV2GridShiftFile.java

    r6830 r6990  
    169169        HashMap<String, List<NTV2SubGrid>> subGridMap = new HashMap<String, List<NTV2SubGrid>>();
    170170        for (int i = 0; i < subGrid.length; i++) {
    171             if (subGrid[i].getParentSubGridName().equalsIgnoreCase("NONE")) {
     171            if ("NONE".equalsIgnoreCase(subGrid[i].getParentSubGridName())) {
    172172                topLevelCount++;
    173173            }
     
    177177        topLevelCount = 0;
    178178        for (int i = 0; i < subGrid.length; i++) {
    179             if (subGrid[i].getParentSubGridName().equalsIgnoreCase("NONE")) {
     179            if ("NONE".equalsIgnoreCase(subGrid[i].getParentSubGridName())) {
    180180                topLevelSubGrid[topLevelCount++] = subGrid[i];
    181181            } else {
Note: See TracChangeset for help on using the changeset viewer.