mirror of
https://github.com/haveno-dex/haveno.git
synced 2025-06-14 01:52:54 -04:00
Replace manual checks with equivalent `Optional.ofNullable()
`
This commit is contained in:
parent
0068ffa416
commit
c5d760b2a0
1 changed files with 2 additions and 2 deletions
|
@ -109,8 +109,8 @@ public class P2PService implements SetupListener, MessageListener, ConnectionLis
|
||||||
this.torDir = torDir;
|
this.torDir = torDir;
|
||||||
this.clock = clock;
|
this.clock = clock;
|
||||||
|
|
||||||
optionalEncryptionService = encryptionService == null ? Optional.empty() : Optional.of(encryptionService);
|
optionalEncryptionService = Optional.ofNullable(encryptionService);
|
||||||
optionalKeyRing = keyRing == null ? Optional.empty() : Optional.of(keyRing);
|
optionalKeyRing = Optional.ofNullable(keyRing);
|
||||||
|
|
||||||
init(useLocalhost, networkId, storageDir);
|
init(useLocalhost, networkId, storageDir);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue