From 43a254d6f369438d785f70b979f0752ce13b736b Mon Sep 17 00:00:00 2001 From: Andreas Schildbach Date: Sun, 11 Mar 2018 16:14:19 +0100 Subject: [PATCH] JavaDoc: Fix dangling comments. --- .../bitcoinj/core/FullPrunedBlockChain.java | 2 +- .../PaymentChannelClientConnection.java | 16 +----------- .../java/org/bitcoinj/utils/BtcFormat.java | 10 ++----- .../main/java/org/bitcoinj/wallet/Wallet.java | 26 ++++++++----------- .../bitcoinj/net/NetworkAbstractionTests.java | 2 +- 5 files changed, 16 insertions(+), 40 deletions(-) diff --git a/core/src/main/java/org/bitcoinj/core/FullPrunedBlockChain.java b/core/src/main/java/org/bitcoinj/core/FullPrunedBlockChain.java index 4bdebbce..389aab2e 100644 --- a/core/src/main/java/org/bitcoinj/core/FullPrunedBlockChain.java +++ b/core/src/main/java/org/bitcoinj/core/FullPrunedBlockChain.java @@ -340,10 +340,10 @@ public class FullPrunedBlockChain extends AbstractBlockChain { return new TransactionOutputChanges(txOutsCreated, txOutsSpent); } - @Override /** * Used during reorgs to connect a block previously on a fork */ + @Override protected synchronized TransactionOutputChanges connectTransactions(StoredBlock newBlock) throws VerificationException, BlockStoreException, PrunedException { checkState(lock.isHeldByCurrentThread()); diff --git a/core/src/main/java/org/bitcoinj/protocols/channels/PaymentChannelClientConnection.java b/core/src/main/java/org/bitcoinj/protocols/channels/PaymentChannelClientConnection.java index 43491ed8..a0b50d60 100644 --- a/core/src/main/java/org/bitcoinj/protocols/channels/PaymentChannelClientConnection.java +++ b/core/src/main/java/org/bitcoinj/protocols/channels/PaymentChannelClientConnection.java @@ -246,21 +246,7 @@ public class PaymentChannelClientConnection { public ListenableFuture incrementPayment(Coin size) throws ValueOutOfRangeException, IllegalStateException { return channelClient.incrementPayment(size, null, null); } - /** - * Increments the total value which we pay the server. - * - * @param size How many satoshis to increment the payment by (note: not the new total). - * @param info Information about this payment increment, used to extend this protocol. - * @throws ValueOutOfRangeException If the size is negative or would pay more than this channel's total value - * ({@link PaymentChannelClientConnection#state()}.getTotalValue()) - * @throws IllegalStateException If the channel has been closed or is not yet open - * (see {@link PaymentChannelClientConnection#getChannelOpenFuture()} for the second) - */ - /* - public ListenableFuture incrementPayment(Coin size, ByteString info) throws ValueOutOfRangeException, IllegalStateException { - return channelClient.incrementPayment(size, info, null); - } -*/ + /** * Increments the total value which we pay the server. * diff --git a/core/src/main/java/org/bitcoinj/utils/BtcFormat.java b/core/src/main/java/org/bitcoinj/utils/BtcFormat.java index a8d2bbfd..00c5e728 100644 --- a/core/src/main/java/org/bitcoinj/utils/BtcFormat.java +++ b/core/src/main/java/org/bitcoinj/utils/BtcFormat.java @@ -1107,9 +1107,7 @@ public abstract class BtcFormat extends Format { return new BtcFixedFormat(locale, scale, minDecimals, groups); } - /***********************/ - /****** FORMATTING *****/ - /***********************/ + // ****** FORMATTING ***** /** * Formats a bitcoin monetary value and returns an {@link java.text.AttributedCharacterIterator}. @@ -1295,9 +1293,7 @@ public abstract class BtcFormat extends Format { return satoshis; } - /********************/ - /****** PARSING *****/ - /********************/ + // ****** PARSING ***** /** * Parse a String representation of a Bitcoin monetary value. Returns a @@ -1462,9 +1458,7 @@ public abstract class BtcFormat extends Format { return (Coin)parseObject(source); } - /*********************************/ /****** END OF PARSING STUFF *****/ - /*********************************/ protected static String prefixCode(String code, int scale) { switch (scale) { diff --git a/core/src/main/java/org/bitcoinj/wallet/Wallet.java b/core/src/main/java/org/bitcoinj/wallet/Wallet.java index 6f913925..61c3ec33 100644 --- a/core/src/main/java/org/bitcoinj/wallet/Wallet.java +++ b/core/src/main/java/org/bitcoinj/wallet/Wallet.java @@ -397,7 +397,7 @@ public class Wallet extends BaseTaggableObject } } - /******************************************************************************************************************/ + // *************************************************************************************************************** //region Key Management @@ -1270,7 +1270,7 @@ public class Wallet extends BaseTaggableObject //endregion - /******************************************************************************************************************/ + // *************************************************************************************************************** //region Serialization support @@ -1608,7 +1608,7 @@ public class Wallet extends BaseTaggableObject //endregion - /******************************************************************************************************************/ + // *************************************************************************************************************** //region Inbound transaction reception and processing @@ -2496,7 +2496,7 @@ public class Wallet extends BaseTaggableObject //endregion - /******************************************************************************************************************/ + // *************************************************************************************************************** //region Event listeners @@ -2797,7 +2797,7 @@ public class Wallet extends BaseTaggableObject //endregion - /******************************************************************************************************************/ + // *************************************************************************************************************** //region Vending transactions and other internal state @@ -3429,7 +3429,7 @@ public class Wallet extends BaseTaggableObject //endregion - /******************************************************************************************************************/ + // *************************************************************************************************************** //region Balance and balance futures @@ -3671,7 +3671,7 @@ public class Wallet extends BaseTaggableObject //endregion - /******************************************************************************************************************/ + // *************************************************************************************************************** //region Creating and sending transactions @@ -4298,8 +4298,7 @@ public class Wallet extends BaseTaggableObject //endregion - /******************************************************************************************************************/ - + // *************************************************************************************************************** /** * A custom {@link TransactionOutput} that is free standing. This contains all the information * required for spending without actually having all the linked data (i.e parent tx). @@ -4349,10 +4348,7 @@ public class Wallet extends BaseTaggableObject } } - /******************************************************************************************************************/ - - - /******************************************************************************************************************/ + // *************************************************************************************************************** private static class TxOffsetPair implements Comparable { public final Transaction tx; @@ -4703,7 +4699,7 @@ public class Wallet extends BaseTaggableObject //endregion - /******************************************************************************************************************/ + // *************************************************************************************************************** //region Extensions to the wallet format. @@ -5016,7 +5012,7 @@ public class Wallet extends BaseTaggableObject //endregion - /******************************************************************************************************************/ + // *************************************************************************************************************** //region Wallet maintenance transactions diff --git a/core/src/test/java/org/bitcoinj/net/NetworkAbstractionTests.java b/core/src/test/java/org/bitcoinj/net/NetworkAbstractionTests.java index e0ea3809..b5ec3a92 100644 --- a/core/src/test/java/org/bitcoinj/net/NetworkAbstractionTests.java +++ b/core/src/test/java/org/bitcoinj/net/NetworkAbstractionTests.java @@ -363,7 +363,7 @@ public class NetworkAbstractionTests { @Test public void largeDataTest() throws Exception { - /** Test various large-data handling, essentially testing {@link ProtobufConnection#receiveBytes(java.nio.ByteBuffer)} */ + // Test various large-data handling, essentially testing {@link ProtobufConnection#receiveBytes(java.nio.ByteBuffer)} final SettableFuture serverConnectionOpen = SettableFuture.create(); final SettableFuture clientConnectionOpen = SettableFuture.create(); final SettableFuture serverConnectionClosed = SettableFuture.create();