Skip to content

Commit

Permalink
Inline declaration of default value
Browse files Browse the repository at this point in the history
  • Loading branch information
freimair committed Mar 6, 2019
1 parent 09aa934 commit 1875b88
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions p2p/src/main/java/bisq/network/p2p/network/Connection.java
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,10 @@ public static int getPermittedMessageSize() {
private Optional<NodeAddress> peersNodeAddressOptional = Optional.<NodeAddress>empty();
@Getter
private volatile boolean stopped;

// Use Peer as default, in case of other types they will set it as soon as possible.
@Getter
private PeerType peerType;
private PeerType peerType = PeerType.PEER;
@Getter
private final ObjectProperty<NodeAddress> peersNodeAddressProperty = new SimpleObjectProperty<>();
private final List<Tuple2<Long, String>> messageTimeStamps = new ArrayList<>();
Expand Down Expand Up @@ -203,9 +205,6 @@ private void init(@Nullable NodeAddress peersNodeAddress) {
// We create a thread for handling inputStream data
singleThreadExecutor.submit(this);

// Use Peer as default, in case of other types they will set it as soon as possible.
peerType = PeerType.PEER;

if (peersNodeAddress != null)
setPeersNodeAddress(peersNodeAddress);

Expand Down

0 comments on commit 1875b88

Please sign in to comment.