Changeset 14522 in josm for trunk


Ignore:
Timestamp:
2018-12-08T20:14:58+01:00 (6 months ago)
Author:
Don-vip
Message:

see #16073 - add robustness

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/tools/HttpClient.java

    r14496 r14522  
    161161                );
    162162                if (Logging.isDebugEnabled()) {
    163                     Logging.debug("RESPONSE: {0}", connection.getHeaderFields());
     163                    try {
     164                        Logging.debug("RESPONSE: {0}", connection.getHeaderFields());
     165                    } catch (IllegalArgumentException e) {
     166                        Logging.warn(e);
     167                    }
    164168                }
    165169                if (DefaultAuthenticator.getInstance().isEnabled() && connection.getResponseCode() == HttpURLConnection.HTTP_UNAUTHORIZED) {
  • trunk/test/unit/org/openstreetmap/josm/gui/preferences/imagery/ImageryPreferenceTestIT.java

    r14521 r14522  
    6565
    6666    private void checkUrl(ImageryInfo info, String url) {
    67         if (url != null && !workingURLs.contains(url)) {
     67        if (url != null && !url.isEmpty() && !workingURLs.contains(url)) {
    6868            try {
    6969                Response response = HttpClient.create(new URL(url)).connect();
Note: See TracChangeset for help on using the changeset viewer.