Ignore:
Timestamp:
2018-08-29T19:40:53+02:00 (6 years ago)
Author:
Don-vip
Message:

spotbugs - fix various issues found with Eclipse plugin

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/org/openstreetmap/josm/gui/preferences/map/MapPaintPreferenceTestIT.java

    r13655 r14201  
    66
    77import java.util.Collection;
    8 import java.util.Collections;
    98import java.util.HashMap;
    109import java.util.Map;
     
    8483                    }
    8584                }
    86                 if (style != null) {
    87                     System.out.println(style.isValid() ? " => OK" : " => KO");
    88                     Collection<Throwable> errors = style.getErrors();
    89                     Collection<String> warnings = style.getWarnings();
    90                     if (!errors.isEmpty()) {
    91                         allErrors.put(source.url, errors);
    92                     }
    93                     if (!warnings.isEmpty()) {
    94                         allWarnings.put(source.url, warnings);
    95                     }
    96                 } else {
    97                     allWarnings.put(source.url, Collections.singleton("MapPaintStyles.addStyle() returned null"));
     85                System.out.println(style.isValid() ? " => OK" : " => KO");
     86                Collection<Throwable> errors = style.getErrors();
     87                Collection<String> warnings = style.getWarnings();
     88                if (!errors.isEmpty()) {
     89                    allErrors.put(source.url, errors);
     90                }
     91                if (!warnings.isEmpty()) {
     92                    allWarnings.put(source.url, warnings);
    9893                }
    9994            }
Note: See TracChangeset for help on using the changeset viewer.