From aaa71c08114dc79f55aba726a39d98c22147eb06 Mon Sep 17 00:00:00 2001 From: Mike Hearn Date: Fri, 5 Jul 2013 11:47:42 +0200 Subject: [PATCH] Fix AbstractBlockChain.removeListener. Found by IntelliJ. --- .../java/com/google/bitcoin/core/AbstractBlockChain.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/src/main/java/com/google/bitcoin/core/AbstractBlockChain.java b/core/src/main/java/com/google/bitcoin/core/AbstractBlockChain.java index b6efe44f..ef82c2b7 100644 --- a/core/src/main/java/com/google/bitcoin/core/AbstractBlockChain.java +++ b/core/src/main/java/com/google/bitcoin/core/AbstractBlockChain.java @@ -162,7 +162,7 @@ public abstract class AbstractBlockChain { * Removes the given {@link BlockChainListener} from the chain. */ public void removeListener(BlockChainListener listener) { - listeners.remove(listener); + ListenerRegistration.removeFromList(listener, listeners); } /** @@ -177,7 +177,7 @@ public abstract class AbstractBlockChain { * This version is used when the transactions have not been verified. * @param storedPrev The {@link StoredBlock} which immediately precedes block. * @param block The {@link Block} to add/update. - * @returns the newly created {@link StoredBlock} + * @return the newly created {@link StoredBlock} */ protected abstract StoredBlock addToBlockStore(StoredBlock storedPrev, Block block) throws BlockStoreException, VerificationException; @@ -188,7 +188,7 @@ public abstract class AbstractBlockChain { * @param storedPrev The {@link StoredBlock} which immediately precedes block. * @param header The {@link StoredBlock} to add/update. * @param txOutputChanges The total sum of all changes made by this block to the set of open transaction outputs (from a call to connectTransactions) - * @returns the newly created {@link StoredBlock} + * @return the newly created {@link StoredBlock} */ protected abstract StoredBlock addToBlockStore(StoredBlock storedPrev, Block header, TransactionOutputChanges txOutputChanges)