Changeset 6089 in josm


Ignore:
Timestamp:
2013-07-26T21:43:10+02:00 (11 years ago)
Author:
akks
Message:

see #8902 - patch by shinigami
str != null && str.equals("CONST") => "CONST".equals(str)

Location:
trunk/src/org/openstreetmap/josm
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/validation/tests/CrossingWays.java

    r5550 r6089  
    125125                    }
    126126
    127                     if ((es1.railway != null && es1.railway.equals("abandoned"))
    128                             || (railway2 != null && railway2.equals("abandoned"))) {
     127                    if (("abandoned".equals(es1.railway)) || ("abandoned".equals(railway2))) {
    129128                        continue;
    130129                    }
  • trunk/src/org/openstreetmap/josm/data/validation/tests/NodesWithSameName.java

    r4869 r6089  
    3737        String sign = n.get("traffic_sign");
    3838        String highway = n.get("highway");
    39         if (name == null
    40                 || (sign != null && sign.equals("city_limit"))
    41                 || (highway != null && highway.equals("bus_stop")))
     39        if (name == null || ("city_limit".equals(sign)) || ("bus_stop".equals(highway)))
    4240            return;
    4341
  • trunk/src/org/openstreetmap/josm/data/validation/tests/UnclosedWays.java

    r5490 r6089  
    9595        }
    9696        test = w.get("waterway");
    97         if (test != null && test.equals("riverbank")) {
     97        if ("riverbank".equals(test)) {
    9898            set(1108, marktr("waterway type {0}"), test);
    9999        }
  • trunk/src/org/openstreetmap/josm/io/OsmServerReader.java

    r6070 r6089  
    153153    private InputStream FixEncoding(InputStream stream, String encoding) throws IOException
    154154    {
    155         if (encoding != null && encoding.equalsIgnoreCase("gzip")) {
     155        if ("gzip".equalsIgnoreCase(encoding)) {
    156156            stream = new GZIPInputStream(stream);
    157157        }
    158         else if (encoding != null && encoding.equalsIgnoreCase("deflate")) {
     158        else if ("deflate".equalsIgnoreCase(encoding)) {
    159159            stream = new InflaterInputStream(stream, new Inflater(true));
    160160        }
Note: See TracChangeset for help on using the changeset viewer.