Ignore:
Timestamp:
2018-04-19T23:04:48+02:00 (19 months ago)
Author:
Don-vip
Message:

see #16204 - fix unit test, checkstyle

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/io/protocols/data/Handler.java

    r13647 r13650  
    66import java.net.URLConnection;
    77import java.net.URLStreamHandler;
     8import java.util.Optional;
    89
    910import org.openstreetmap.josm.tools.Utils;
     
    3132
    3233        String protocolHandlers = Utils.getSystemProperty("java.protocol.handler.pkgs");
    33         if (protocolHandlers != null && !protocolHandlers.contains(pkg)) {
    34             StringBuilder sb = new StringBuilder(protocolHandlers);
     34        if (protocolHandlers == null || !protocolHandlers.contains(pkg)) {
     35            StringBuilder sb = new StringBuilder(Optional.ofNullable(protocolHandlers).orElse(""));
    3536            if (sb.length() > 0) {
    3637                sb.append('|');
Note: See TracChangeset for help on using the changeset viewer.