diff --git a/core/java/src/net/i2p/data/EncryptedLeaseSet.java b/core/java/src/net/i2p/data/EncryptedLeaseSet.java index ba3a43df9..55f454af3 100644 --- a/core/java/src/net/i2p/data/EncryptedLeaseSet.java +++ b/core/java/src/net/i2p/data/EncryptedLeaseSet.java @@ -600,9 +600,12 @@ public class EncryptedLeaseSet extends LeaseSet2 { public String toString() { StringBuilder buf = new StringBuilder(128); buf.append("[EncryptedLeaseSet: "); - buf.append("\n\tBlinded Key: ").append(_signingKey); - buf.append("\n\tHash: ").append(getHash()); - buf.append("\n\tB32: ").append(getHash().toBase32()); + if (_signingKey != null) { + buf.append("\n\tBlinded Key: ").append(_signingKey); + Hash h = getHash(); + buf.append("\n\tHash: ").append(h); + buf.append("\n\tB32: ").append(h.toBase32()); + } if (isOffline()) { buf.append("\n\tTransient Key: ").append(_transientSigningPublicKey); buf.append("\n\tTransient Expires: ").append(new java.util.Date(_transientExpires)); diff --git a/core/java/src/net/i2p/data/LeaseSet.java b/core/java/src/net/i2p/data/LeaseSet.java index a594437ba..cf88f9fa0 100644 --- a/core/java/src/net/i2p/data/LeaseSet.java +++ b/core/java/src/net/i2p/data/LeaseSet.java @@ -401,8 +401,10 @@ public class LeaseSet extends DatabaseEntry { public String toString() { StringBuilder buf = new StringBuilder(128); buf.append("[LeaseSet: "); - buf.append("\n\tDestination: ").append(_destination); - buf.append("\n\tB32: ").append(_destination.toBase32()); + if (_destination != null) { + buf.append("\n\tDestination: ").append(_destination); + buf.append("\n\tB32: ").append(_destination.toBase32()); + } buf.append("\n\tEncryptionKey: ").append(_encryptionKey); buf.append("\n\tSigningKey: ").append(_signingKey); buf.append("\n\tSignature: ").append(_signature); diff --git a/core/java/src/net/i2p/data/LeaseSet2.java b/core/java/src/net/i2p/data/LeaseSet2.java index dbc5916fb..1f183ef7c 100644 --- a/core/java/src/net/i2p/data/LeaseSet2.java +++ b/core/java/src/net/i2p/data/LeaseSet2.java @@ -603,8 +603,10 @@ public class LeaseSet2 extends LeaseSet { public String toString() { StringBuilder buf = new StringBuilder(128); buf.append("[LeaseSet2: "); - buf.append("\n\tDestination: ").append(_destination); - buf.append("\n\tB32: ").append(_destination.toBase32()); + if (_destination != null) { + buf.append("\n\tDestination: ").append(_destination); + buf.append("\n\tB32: ").append(_destination.toBase32()); + } List keys = getEncryptionKeys(); int sz = keys.size(); buf.append("\n\tEncryption Keys: ").append(sz);