Changeset 11401 in josm for trunk/src


Ignore:
Timestamp:
2016-12-15T07:22:11+01:00 (3 years ago)
Author:
Don-vip
Message:

findbugs - RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE

File:
1 edited

Legend:

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

    r11400 r11401  
    260260
    261261        for (SourceEntry entry : sourceEntries) {
    262             StyleSource source = fromSourceEntry(entry);
    263             if (source != null) {
    264                 styles.add(source);
    265             }
     262            styles.add(fromSourceEntry(entry));
    266263        }
    267264        for (StyleSource source : styles.getStyleSources()) {
     
    420417    public static StyleSource addStyle(SourceEntry entry) {
    421418        StyleSource source = fromSourceEntry(entry);
    422         if (source != null) {
    423             styles.add(source);
    424             loadStyleForFirstTime(source);
    425             MapPaintPrefHelper.INSTANCE.put(styles.getStyleSources());
    426             fireMapPaintSylesUpdated();
    427             styles.clearCached();
    428             if (Main.isDisplayingMapView()) {
    429                 Main.map.mapView.repaint();
    430             }
     419        styles.add(source);
     420        loadStyleForFirstTime(source);
     421        MapPaintPrefHelper.INSTANCE.put(styles.getStyleSources());
     422        fireMapPaintSylesUpdated();
     423        styles.clearCached();
     424        if (Main.isDisplayingMapView()) {
     425            Main.map.mapView.repaint();
    431426        }
    432427        return source;
Note: See TracChangeset for help on using the changeset viewer.