}
@Override
- @SuppressWarnings("unchecked")
public Map<String, Variant<?>> GetAll(final String interface_name) {
final var handler = getHandlerOptional(interface_name);
if (handler.isEmpty()) {
.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);
}));
}
}