mirror of
https://github.com/bitcoinj/bitcoinj.git
synced 2024-11-19 18:00:39 +01:00
DeterministicKeyChain: convert if-else in getEarliestKeyCreationTimeInstant() to terniary operator
This commit is contained in:
parent
2cd239eee0
commit
9ba34fc2ed
@ -711,10 +711,10 @@ public class DeterministicKeyChain implements EncryptableKeyChain {
|
||||
|
||||
@Override
|
||||
public Instant getEarliestKeyCreationTimeInstant() {
|
||||
if (seed != null)
|
||||
return Instant.ofEpochSecond(seed.getCreationTimeSeconds());
|
||||
else
|
||||
return Instant.ofEpochSecond(getWatchingKey().getCreationTimeSeconds());
|
||||
return Instant.ofEpochSecond(seed != null ?
|
||||
seed.getCreationTimeSeconds() :
|
||||
getWatchingKey().getCreationTimeSeconds()
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
Reference in New Issue
Block a user