Ignore:
Timestamp:
2023-08-09T15:30:01+02:00 (2 years ago)
Author:
taylor.smock
Message:

Fix #22832: Code cleanup and some simplification, documentation fixes (patch by gaben)

There should not be any functional changes in this patch; it is intended to do
the following:

  • Simplify and cleanup code (example: Arrays.asList(item) -> Collections.singletonList(item))
  • Fix typos in documentation (which also corrects the documentation to match what actually happens, in some cases)
Location:
trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/ConditionFactory.java

    r18414 r18801  
    212212        /**
    213213         * Create a new float operation that compares two float values
    214          * @param comparatorResult A function to mapt the result of the comparison
     214         * @param comparatorResult A function to map the result of the comparison
    215215         */
    216216        Op(IntFunction<Boolean> comparatorResult) {
     
    830830         */
    831831        static boolean unclosed_multipolygon(Environment e) {
    832             return e.osm instanceof Relation && ((Relation) e.osm).isMultipolygon() &&
     832            return e.osm instanceof Relation && e.osm.isMultipolygon() &&
    833833                    !e.osm.isIncomplete() && !((Relation) e.osm).hasIncompleteMembers() &&
    834834                    !MultipolygonCache.getInstance().get((Relation) e.osm).getOpenEnds().isEmpty();
  • trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSParser.jj

    r18757 r18801  
    712712{
    713713    boolean not = false;
    714     KeyMatchType matchType = null;;
     714    KeyMatchType matchType = null;
    715715    String key;
    716716}
     
    733733    float f;
    734734    int i;
    735     KeyMatchType matchType = null;;
     735    KeyMatchType matchType = null;
    736736    Op op;
    737737    boolean considerValAsKey = false;
  • trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSStyleIndex.java

    r16784 r18801  
    149149            }
    150150        } else if (p instanceof IRelation) {
    151             if (((IRelation<?>) p).isMultipolygon()) {
     151            if (p.isMultipolygon()) {
    152152                return multipolygonRules;
    153153            } else if (p.hasKey("#canvas")) {
Note: See TracChangeset for help on using the changeset viewer.