Ignore:
Timestamp:
2017-02-19T23:52:08+01:00 (3 years ago)
Author:
Don-vip
Message:

checkstyle - enable BooleanExpressionComplexity / 6

Location:
trunk/src/org/openstreetmap/josm/data/osm
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/osm/AbstractPrimitive.java

    r11452 r11587  
    725725
    726726    /**
     727     * Replies true if this primitive has a tag any of the <code>keys</code>.
     728     *
     729     * @param keys the keys
     730     * @return true, if his primitive has a tag with any of the <code>keys</code>
     731     * @since 11587
     732     */
     733    public boolean hasKey(String ... keys) {
     734        return keys != null && Arrays.stream(keys).anyMatch(this::hasKey);
     735    }
     736
     737    /**
    727738     * What to do, when the tags have changed by one of the tag-changing methods.
    728739     * @param originalKeys original tags
  • trunk/src/org/openstreetmap/josm/data/osm/OsmPrimitive.java

    r11503 r11587  
    11781178     */
    11791179    public boolean hasEqualTechnicalAttributes(OsmPrimitive other) {
     1180        // CHECKSTYLE.OFF: BooleanExpressionComplexity
    11801181        return other != null
    11811182            && timestamp == other.timestamp
     
    11861187            && isVisible() == other.isVisible()
    11871188            && Objects.equals(user, other.user);
     1189        // CHECKSTYLE.ON: BooleanExpressionComplexity
    11881190    }
    11891191
     
    13541356                || "yes".equals(get("area"))
    13551357                || "riverbank".equals(get("waterway"))
    1356                 || hasKey("natural")
    1357                 || hasKey("amenity")
    1358                 || hasKey("leisure")
    1359                 || hasKey("building")
    1360                 || hasKey("building:part");
     1358                || hasKey("natural", "amenity", "leisure", "building", "building:part");
    13611359    }
    13621360
Note: See TracChangeset for help on using the changeset viewer.