Remove dead code and fix inspection issues

This commit is contained in:
AsamK 2021-12-05 10:25:46 +01:00
parent 6ffeb7c431
commit e83f43065e
13 changed files with 10 additions and 82 deletions

View file

@ -18,12 +18,10 @@ import java.util.stream.Collectors;
public class DbusReceiveMessageHandler implements Manager.ReceiveMessageHandler {
private final Manager m;
private final DBusConnection conn;
private final String objectPath;
public DbusReceiveMessageHandler(Manager m, DBusConnection conn, final String objectPath) {
this.m = m;
public DbusReceiveMessageHandler(DBusConnection conn, final String objectPath) {
this.conn = conn;
this.objectPath = objectPath;
}
@ -127,7 +125,7 @@ public class DbusReceiveMessageHandler implements Manager.ReceiveMessageHandler
var attachments = message.attachments()
.stream()
.filter(a -> a.id().isPresent())
.map(a -> getAttachmentMap(m, a))
.map(this::getAttachmentMap)
.collect(Collectors.toList());
extras.put("attachments", new Variant<>(attachments, "aa{sv}"));
}
@ -180,7 +178,7 @@ public class DbusReceiveMessageHandler implements Manager.ReceiveMessageHandler
}
private Map<String, Variant<?>> getAttachmentMap(
final Manager m, final MessageEnvelope.Data.Attachment a
final MessageEnvelope.Data.Attachment a
) {
final var map = new HashMap<String, Variant<?>>();
if (a.id().isPresent()) {