Use singletonList.

This commit is contained in:
Carsten Otto 2015-07-04 17:49:16 +02:00 committed by Andreas Schildbach
parent ba468dd775
commit aadafdc6c9
2 changed files with 2 additions and 3 deletions

View file

@ -590,7 +590,7 @@ public abstract class AbstractBlockChain {
Transaction tx = filteredTxn.get(hash);
if (tx != null) {
sendTransactionsToListener(newStoredBlock, newBlockType, listener, relativityOffset,
Arrays.asList(tx), !first, falsePositives);
Collections.singletonList(tx), !first, falsePositives);
} else {
if (listener.notifyTransactionIsInBlock(hash, newStoredBlock, newBlockType, relativityOffset)) {
falsePositives.remove(hash);

View file

@ -19,7 +19,6 @@ import org.bitcoinj.core.ECKey;
import org.bitcoinj.script.Script;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
@ -54,7 +53,7 @@ public class RedeemData {
*/
public static RedeemData of(ECKey key, Script program) {
checkArgument(program.isSentToAddress() || program.isSentToRawPubKey());
return key != null ? new RedeemData(Arrays.asList(key), program) : null;
return key != null ? new RedeemData(Collections.singletonList(key), program) : null;
}
/**