Ignore:
Timestamp:
2016-12-12T17:29:27+01:00 (9 years ago)
Author:
Don-vip
Message:

findbugs - BC_UNCONFIRMED_CAST

File:
1 edited

Legend:

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

    r11374 r11383  
    622622                matchingRuleIndex = wayRules;
    623623            }
    624         } else {
     624        } else if (osm instanceof Relation) {
    625625            if (((Relation) osm).isMultipolygon()) {
    626626                matchingRuleIndex = multipolygonRules;
     
    630630                matchingRuleIndex = relationRules;
    631631            }
    632         }
    633 
    634         // the declaration indices are sorted, so it suffices to save the
    635         // last used index
     632        } else {
     633            throw new IllegalArgumentException("Unsupported type: " + osm);
     634        }
     635
     636        // the declaration indices are sorted, so it suffices to save the last used index
    636637        int lastDeclUsed = -1;
    637638
Note: See TracChangeset for help on using the changeset viewer.