Changeset 14201 in josm for trunk/scripts


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/scripts/BuildProjectionDefinitions.java

    r13708 r14201  
    88import java.nio.charset.StandardCharsets;
    99import java.util.Arrays;
     10import java.util.Collections;
    1011import java.util.LinkedHashMap;
    1112import java.util.List;
     
    7475
    7576    static List<String> initList(String baseDir, String ext) {
    76         return Arrays.asList(new File(baseDir + File.separator + PROJ_DIR)
    77                 .list((dir, name) -> !name.contains(".") || name.toLowerCase(Locale.ENGLISH).endsWith(ext)));
     77        String[] result = new File(baseDir + File.separator + PROJ_DIR)
     78                .list((dir, name) -> !name.contains(".") || name.toLowerCase(Locale.ENGLISH).endsWith(ext));
     79        return result != null ? Arrays.asList(result) : Collections.emptyList();
    7880    }
    7981
Note: See TracChangeset for help on using the changeset viewer.