Skip to content

Commit

Permalink
SonarLint cleanup
Browse files Browse the repository at this point in the history
- sonar insists on use of HashMap.computeIfAbsent() ...

Signed-off-by: jrte <jrte.project@gmail.com>
  • Loading branch information
jrte committed Sep 20, 2023
1 parent 9d894b3 commit dd2881e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/com/characterforming/jrte/engine/Model.java
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ protected int addSignal(Bytes signalName) {
}

protected int addTransducer(Bytes transducerName) {
Integer ordinal = this.transducerOrdinalMap.get(transducerName);
Integer ordinal = this.transducerOrdinalMap.computeIfAbsent(transducerName, absent -> null);
assert ordinal == null || transducerName.equals(this.transducerNameIndex[ordinal]);
if (ordinal == null) {
ordinal = this.transducerOrdinalMap.size();
Expand Down

0 comments on commit dd2881e

Please sign in to comment.