mirror of
https://github.com/haveno-dex/haveno.git
synced 2025-04-19 23:36:00 -04:00
Replace manual checks with equivalent `Optional.ofNullable()
`
This commit is contained in:
parent
0068ffa416
commit
c5d760b2a0
@ -109,8 +109,8 @@ public class P2PService implements SetupListener, MessageListener, ConnectionLis
|
||||
this.torDir = torDir;
|
||||
this.clock = clock;
|
||||
|
||||
optionalEncryptionService = encryptionService == null ? Optional.empty() : Optional.of(encryptionService);
|
||||
optionalKeyRing = keyRing == null ? Optional.empty() : Optional.of(keyRing);
|
||||
optionalEncryptionService = Optional.ofNullable(encryptionService);
|
||||
optionalKeyRing = Optional.ofNullable(keyRing);
|
||||
|
||||
init(useLocalhost, networkId, storageDir);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user