mirror of
https://github.com/bitcoinj/bitcoinj.git
synced 2025-03-13 11:36:15 +01:00
Block: convert an if into expression with ternary operator
This commit is contained in:
parent
4e91a274d9
commit
f907a6b86f
1 changed files with 3 additions and 3 deletions
|
@ -206,9 +206,9 @@ public class Block extends BaseMessage {
|
|||
this.time = time;
|
||||
this.difficultyTarget = difficultyTarget;
|
||||
this.nonce = nonce;
|
||||
if (transactions != null)
|
||||
transactions = new ArrayList<>(transactions);
|
||||
this.transactions = transactions;
|
||||
this.transactions = transactions != null ?
|
||||
new ArrayList<>(transactions) :
|
||||
null;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Reference in a new issue