mirror of
https://github.com/AsamK/signal-cli
synced 2025-09-05 05:30:38 +00:00
Use pattern matching switch cases
This commit is contained in:
parent
80c1a6d2af
commit
8d55dfb66b
27 changed files with 395 additions and 380 deletions
|
@ -65,7 +65,7 @@ public abstract class DbusProperties implements Properties {
|
|||
.filter(p -> p.getGetter() != null)
|
||||
.collect(Collectors.toMap(DbusProperty::getName, p -> {
|
||||
final Object o = p.getGetter().get();
|
||||
return o instanceof Variant ? (Variant<Object>) o : new Variant<>(o);
|
||||
return o instanceof Variant<?> variant ? variant : new Variant<>(o);
|
||||
}));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue