Ignore:
Timestamp:
2015-12-28T00:02:30+01:00 (5 years ago)
Author:
simon04
Message:

see #12231 - fix MultiFetchServerObjectReaderTest#multiGetWithNonExistingNode

File:
1 edited

Legend:

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

    r9182 r9184  
    104104            try {
    105105                connection.connect();
    106                 if (reasonForRequest != null && "".equalsIgnoreCase(reasonForRequest)) {
    107                     Main.info("{0} {1} ({2}) -> {3}", requestMethod, url, reasonForRequest, connection.getResponseCode());
    108                 } else {
    109                     Main.info("{0} {1} -> {2}", requestMethod, url, connection.getResponseCode());
    110                 }
     106                final boolean hasReason = reasonForRequest != null && "".equalsIgnoreCase(reasonForRequest);
     107                Main.info("{0} {1}{2} -> {3}{4}",
     108                        requestMethod, url, hasReason ? " (" + reasonForRequest + ")" : "",
     109                        connection.getResponseCode(),
     110                        connection.getContentLengthLong() > 0 ? " (" + connection.getContentLengthLong() / 1024 + "KB)" : ""
     111                );
    111112                if (Main.isDebugEnabled()) {
    112113                    Main.debug("RESPONSE: " + connection.getHeaderFields());
    113114                }
    114115            } catch (IOException e) {
     116                Main.info("{0} {1} -> !!!", requestMethod, url);
    115117                Main.warn(e);
    116118                //noinspection ThrowableResultOfMethodCallIgnored
Note: See TracChangeset for help on using the changeset viewer.