remove @Nullable/@NotNull annotations (too noisy and better use Optional/Either instead to avoid null pointer exc.)

This commit is contained in:
Manfred Karrer 2014-07-01 15:09:23 +02:00
parent d9410f91a0
commit 4f26d76746
88 changed files with 1539 additions and 1122 deletions

View file

@ -2,17 +2,22 @@ package io.bitsquare.btc;
import com.google.bitcoin.core.*;
import com.google.inject.Inject;
import io.bitsquare.currency.Bitcoin;
import java.math.BigInteger;
import org.jetbrains.annotations.Nullable;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class FeePolicy
{
public static final BigInteger TX_FEE = Transaction.REFERENCE_DEFAULT_MIN_TX_FEE;
public static final BigInteger ACCOUNT_REGISTRATION_FEE = Utils.toNanoCoins("0.01");
public static final BigInteger CREATE_OFFER_FEE = Utils.toNanoCoins("0.001");
public static final BigInteger TAKE_OFFER_FEE = CREATE_OFFER_FEE;
public static final BigInteger TX_FEE_depr = Transaction.REFERENCE_DEFAULT_MIN_TX_FEE;
public static final BigInteger ACCOUNT_REGISTRATION_FEE_depr = Utils.toNanoCoins("0.01");
public static final BigInteger CREATE_OFFER_FEE_depr = Utils.toNanoCoins("0.001");
public static final BigInteger TAKE_OFFER_FEE_depr = CREATE_OFFER_FEE_depr;
public static final Bitcoin TX_FEE = new Bitcoin(Transaction.REFERENCE_DEFAULT_MIN_TX_FEE);
public static final Bitcoin CREATE_OFFER_FEE = new Bitcoin(Utils.toNanoCoins("0.001"));
public static final Bitcoin TAKE_OFFER_FEE = CREATE_OFFER_FEE;
private static final Logger log = LoggerFactory.getLogger(FeePolicy.class);
private static final String registrationFeeAddress = "mvkDXt4QmN4Nq9dRUsRigBCaovde9nLkZR";
private static final String createOfferFeeAddress = "n2upbsaKAe4PD3cc4JfS7UCqPC5oNd7Ckg";
@ -27,7 +32,7 @@ public class FeePolicy
}
//TODO other users or dev address? use donation option list? (dev, other users, wikileaks, tor, sub projects (bitcoinj, tomp2p,...)...)
@Nullable
public Address getAddressForRegistrationFee()
{
try
@ -41,7 +46,7 @@ public class FeePolicy
}
//TODO get address form arbitrator list
@Nullable
public Address getAddressForCreateOfferFee()
{
try
@ -55,7 +60,7 @@ public class FeePolicy
}
//TODO get address form the intersection of both traders arbitrator lists
@Nullable
public Address getAddressForTakeOfferFee()
{
try