EepHead: Don't output null values in CLI

This commit is contained in:
zzz
2019-09-14 14:14:11 +00:00
parent 65d0ea3f0b
commit 67cd6409a0

View File

@ -139,10 +139,16 @@ public class EepHead extends EepGet {
get.addAuthorization(username, password); get.addAuthorization(username, password);
} }
if (get.fetch(45*1000, -1, inactivityTimeout)) { if (get.fetch(45*1000, -1, inactivityTimeout)) {
System.err.println("Content-Type: " + get.getContentType()); String x = get.getContentType();
if (x != null)
System.err.println("Content-Type: " + x);
System.err.println("Content-Length: " + get.getContentLength()); System.err.println("Content-Length: " + get.getContentLength());
System.err.println("Last-Modified: " + get.getLastModified()); x = get.getLastModified();
System.err.println("Etag: " + get.getETag()); if (x != null)
System.err.println("Last-Modified: " + x);
x = get.getETag();
if (x != null)
System.err.println("Etag: " + x);
} else { } else {
System.err.println("Failed " + url); System.err.println("Failed " + url);
System.exit(1); System.exit(1);