mirror of
https://github.com/bisq-network/bisq.git
synced 2025-02-25 07:27:18 +01:00
Polish
- 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:
parent
c8ece38889
commit
1d5673ebb1
8 changed files with 10 additions and 20 deletions
|
@ -132,8 +132,7 @@ public class BitsquareEnvironment extends StandardEnvironment {
|
|||
return System.getenv("APPDATA");
|
||||
else if (Utilities.isOSX())
|
||||
return Paths.get(System.getProperty("user.home"), "Library", "Application Support").toString();
|
||||
else
|
||||
// *nix
|
||||
else // *nix
|
||||
return Paths.get(System.getProperty("user.home"), ".local", "share").toString();
|
||||
}
|
||||
|
||||
|
|
|
@ -19,11 +19,6 @@ package io.bitsquare.btc;
|
|||
|
||||
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 java.io.File;
|
||||
|
@ -42,7 +37,7 @@ public class BitcoinModule extends BitsquareModule {
|
|||
@Override
|
||||
protected void configure() {
|
||||
bind(BitcoinNetwork.class).toInstance(
|
||||
env.getProperty(BitcoinNetwork.KEY, BitcoinNetwork.class, BitcoinNetwork.DEFAULT));
|
||||
env.getProperty(BitcoinNetwork.KEY, BitcoinNetwork.class, BitcoinNetwork.DEFAULT));
|
||||
bind(FeePolicy.class).asEagerSingleton();
|
||||
|
||||
bindConstant().annotatedWith(named(UserAgent.NAME_KEY)).to(env.getRequiredProperty(UserAgent.NAME_KEY));
|
||||
|
|
|
@ -26,9 +26,6 @@ import org.bitcoinj.core.Transaction;
|
|||
|
||||
import javax.inject.Inject;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
public class FeePolicy {
|
||||
|
||||
public static final Coin TX_FEE = Transaction.REFERENCE_DEFAULT_MIN_TX_FEE;
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
</Label>
|
||||
<TextField fx:id="bitcoinNetwork" GridPane.rowIndex="0" GridPane.columnIndex="1"
|
||||
mouseTransparent="true" focusTraversable="false">
|
||||
<GridPane.margin>
|
||||
<GridPane.margin>
|
||||
<Insets top="10"/>
|
||||
</GridPane.margin>
|
||||
</TextField>
|
||||
|
@ -60,7 +60,7 @@
|
|||
</Label>
|
||||
<TextField fx:id="bootstrapNodeAddress" GridPane.rowIndex="3" GridPane.columnIndex="1"
|
||||
mouseTransparent="true" focusTraversable="false">
|
||||
<GridPane.margin>
|
||||
<GridPane.margin>
|
||||
<Insets bottom="-15"/>
|
||||
</GridPane.margin>
|
||||
</TextField>
|
||||
|
|
|
@ -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
|
||||
* given value, trying all case variations in the process.
|
||||
*
|
||||
* @return the matching enum label (if any)
|
||||
* @throws IllegalArgumentException if no such label matching the given value is found.
|
||||
*/
|
||||
|
|
|
@ -30,9 +30,7 @@ import java.net.UnknownHostException;
|
|||
import java.util.UUID;
|
||||
import java.util.concurrent.CountDownLatch;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import javafx.beans.property.BooleanProperty;
|
||||
import javafx.beans.property.SimpleBooleanProperty;
|
||||
import java.util.concurrent.atomic.AtomicBoolean;
|
||||
|
||||
import net.tomp2p.connection.Bindings;
|
||||
import net.tomp2p.connection.ChannelClientConfiguration;
|
||||
|
@ -307,8 +305,8 @@ public class TomP2PTests {
|
|||
BaseFuture fb1 = peer1.peer().bootstrap().peerAddress(masterPeerAddress).start();
|
||||
BaseFuture fb2 = peer2.peer().bootstrap().peerAddress(masterPeerAddress).start();
|
||||
|
||||
final BooleanProperty peer1Done = new SimpleBooleanProperty();
|
||||
final BooleanProperty peer2Done = new SimpleBooleanProperty();
|
||||
final AtomicBoolean peer1Done = new AtomicBoolean();
|
||||
final AtomicBoolean peer2Done = new AtomicBoolean();
|
||||
|
||||
fb1.addListener(new BaseFutureListener<BaseFuture>() {
|
||||
@Override
|
||||
|
|
Loading…
Add table
Reference in a new issue