- Use AtomicBoolean vs. SimpleBooleanProperty in TomP2PTests to avoid
   use of javax.* classes where they aren't otherwise necessary.

 - Reformat code globally to eliminate trailing whitespace and fix
   indentation

 - Optimize imports globally to eliminate unused imports
This commit is contained in:
Chris Beams 2014-11-14 08:56:06 +01:00
parent c8ece38889
commit 1d5673ebb1
No known key found for this signature in database
GPG key ID: 3D214F8F5BC5ED73
8 changed files with 10 additions and 20 deletions

View file

@ -132,8 +132,7 @@ public class BitsquareEnvironment extends StandardEnvironment {
return System.getenv("APPDATA"); return System.getenv("APPDATA");
else if (Utilities.isOSX()) else if (Utilities.isOSX())
return Paths.get(System.getProperty("user.home"), "Library", "Application Support").toString(); return Paths.get(System.getProperty("user.home"), "Library", "Application Support").toString();
else else // *nix
// *nix
return Paths.get(System.getProperty("user.home"), ".local", "share").toString(); return Paths.get(System.getProperty("user.home"), ".local", "share").toString();
} }

View file

@ -19,11 +19,6 @@ package io.bitsquare.btc;
import io.bitsquare.BitsquareModule; import io.bitsquare.BitsquareModule;
import org.bitcoinj.core.NetworkParameters;
import org.bitcoinj.params.MainNetParams;
import org.bitcoinj.params.RegTestParams;
import org.bitcoinj.params.TestNet3Params;
import com.google.inject.Injector; import com.google.inject.Injector;
import java.io.File; import java.io.File;

View file

@ -26,9 +26,6 @@ import org.bitcoinj.core.Transaction;
import javax.inject.Inject; import javax.inject.Inject;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class FeePolicy { public class FeePolicy {
public static final Coin TX_FEE = Transaction.REFERENCE_DEFAULT_MIN_TX_FEE; public static final Coin TX_FEE = Transaction.REFERENCE_DEFAULT_MIN_TX_FEE;

View file

@ -43,6 +43,7 @@ public class EnumValueConverter implements ValueConverter<Enum> {
/** /**
* Attempt to resolve an enum of the specified type by looking for a label with the * Attempt to resolve an enum of the specified type by looking for a label with the
* given value, trying all case variations in the process. * given value, trying all case variations in the process.
*
* @return the matching enum label (if any) * @return the matching enum label (if any)
* @throws IllegalArgumentException if no such label matching the given value is found. * @throws IllegalArgumentException if no such label matching the given value is found.
*/ */

View file

@ -30,9 +30,7 @@ import java.net.UnknownHostException;
import java.util.UUID; import java.util.UUID;
import java.util.concurrent.CountDownLatch; import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean;
import javafx.beans.property.BooleanProperty;
import javafx.beans.property.SimpleBooleanProperty;
import net.tomp2p.connection.Bindings; import net.tomp2p.connection.Bindings;
import net.tomp2p.connection.ChannelClientConfiguration; import net.tomp2p.connection.ChannelClientConfiguration;
@ -307,8 +305,8 @@ public class TomP2PTests {
BaseFuture fb1 = peer1.peer().bootstrap().peerAddress(masterPeerAddress).start(); BaseFuture fb1 = peer1.peer().bootstrap().peerAddress(masterPeerAddress).start();
BaseFuture fb2 = peer2.peer().bootstrap().peerAddress(masterPeerAddress).start(); BaseFuture fb2 = peer2.peer().bootstrap().peerAddress(masterPeerAddress).start();
final BooleanProperty peer1Done = new SimpleBooleanProperty(); final AtomicBoolean peer1Done = new AtomicBoolean();
final BooleanProperty peer2Done = new SimpleBooleanProperty(); final AtomicBoolean peer2Done = new AtomicBoolean();
fb1.addListener(new BaseFutureListener<BaseFuture>() { fb1.addListener(new BaseFutureListener<BaseFuture>() {
@Override @Override