diff --git a/core/build.gradle b/core/build.gradle index 4c494ee..12373b3 100644 --- a/core/build.gradle +++ b/core/build.gradle @@ -12,8 +12,7 @@ compileJava { dependencies { api fileTree(dir: 'libs', include: ['*.jar']) - - api 'com.google.guava:guava:20.0' //TODO ToStringHelper update for updating to ? + api 'com.google.guava:guava:21.0' //TODO ToStringHelper update for updating to ? api 'com.google.code.findbugs:jsr305:3.0.2' api 'com.madgag.spongycastle:core:1.58.0.0' api 'com.lambdaworks:scrypt:1.4.0' diff --git a/core/src/main/java/com/vergepay/core/wallet/SendRequest.java b/core/src/main/java/com/vergepay/core/wallet/SendRequest.java index ea03469..50dbb39 100644 --- a/core/src/main/java/com/vergepay/core/wallet/SendRequest.java +++ b/core/src/main/java/com/vergepay/core/wallet/SendRequest.java @@ -17,8 +17,6 @@ package com.vergepay.core.wallet; -import com.google.common.base.Objects; -import com.google.common.base.Objects.ToStringHelper; import com.vergepay.core.coins.CoinType; import com.vergepay.core.coins.Value; import com.vergepay.core.messages.TxMessage; @@ -184,17 +182,20 @@ public void setCompleted(boolean completed) { @Override public String toString() { - // print only the user-settable fields - ToStringHelper helper = Objects.toStringHelper(this).omitNullValues(); - helper.add("emptyWallet", emptyWallet); - helper.add("changeAddress", changeAddress); - helper.add("fee", fee); - helper.add("feePerTxSize", feePerTxSize); - helper.add("ensureMinRequiredFee", ensureMinRequiredFee); - helper.add("signTransaction", signTransaction); - helper.add("aesKey", aesKey != null ? "set" : null); // careful to not leak the key - helper.add("coinSelector", coinSelector); - helper.add("shuffleOutputs", shuffleOutputs); - return helper.toString(); + StringBuilder sb = new StringBuilder(); + sb.append("SendRequest{"); + + if (emptyWallet) sb.append("emptyWallet=").append(emptyWallet).append(", "); + if (changeAddress != null) sb.append("changeAddress=").append(changeAddress).append(", "); + if (fee != null) sb.append("fee=").append(fee).append(", "); + if (feePerTxSize != null) sb.append("feePerTxSize=").append(feePerTxSize).append(", "); + sb.append("ensureMinRequiredFee=").append(ensureMinRequiredFee).append(", "); + sb.append("signTransaction=").append(signTransaction).append(", "); + if (aesKey != null) sb.append("aesKey=set, "); + if (coinSelector != null) sb.append("coinSelector=").append(coinSelector).append(", "); + sb.append("shuffleOutputs=").append(shuffleOutputs); + + sb.append("}"); + return sb.toString(); } } \ No newline at end of file