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/validation/Test.java

    r6623 r6990  
    327327    protected static final boolean isBuilding(OsmPrimitive p) {
    328328        String v = p.get("building");
    329         return v != null && !v.equals("no") && !v.equals("entrance");
     329        return v != null && !"no".equals(v) && !"entrance".equals(v);
    330330    }
    331331}
Note: See TracChangeset for help on using the changeset viewer.