Skip to content

Commit

Permalink
Replace deprecated DBusMap
Browse files Browse the repository at this point in the history
  • Loading branch information
AsamK committed Sep 8, 2024
1 parent a0d1b08 commit eca3c6f
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 4 deletions.
34 changes: 33 additions & 1 deletion graalvm-config-dir/reflect-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -799,6 +799,34 @@
"queryAllDeclaredConstructors":true,
"methods":[{"name":"<init>","parameterTypes":["java.lang.String","java.lang.String"] }, {"name":"pin","parameterTypes":[] }, {"name":"verificationCode","parameterTypes":[] }]
},
{
"name":"org.asamk.signal.dbus.DbusProperties",
"queryAllDeclaredMethods":true
},
{
"name":"org.asamk.signal.dbus.DbusSignalControlImpl",
"queryAllDeclaredMethods":true
},
{
"name":"org.asamk.signal.dbus.DbusSignalImpl",
"queryAllDeclaredMethods":true
},
{
"name":"org.asamk.signal.dbus.DbusSignalImpl$DbusSignalConfigurationImpl",
"queryAllDeclaredMethods":true
},
{
"name":"org.asamk.signal.dbus.DbusSignalImpl$DbusSignalDeviceImpl",
"queryAllDeclaredMethods":true
},
{
"name":"org.asamk.signal.dbus.DbusSignalImpl$DbusSignalGroupImpl",
"queryAllDeclaredMethods":true
},
{
"name":"org.asamk.signal.dbus.DbusSignalImpl$DbusSignalIdentityImpl",
"queryAllDeclaredMethods":true
},
{
"name":"org.asamk.signal.json.JsonAttachment",
"allDeclaredFields":true,
Expand Down Expand Up @@ -1831,6 +1859,10 @@
"name":"org.bouncycastle.pqc.jcajce.provider.XMSS$Mappings",
"methods":[{"name":"<init>","parameterTypes":[] }]
},
{
"name":"org.freedesktop.dbus.connections.base.GlobalHandler",
"queryAllDeclaredMethods":true
},
{
"name":"org.freedesktop.dbus.errors.ServiceUnknown",
"methods":[{"name":"<init>","parameterTypes":["java.lang.String"] }]
Expand Down Expand Up @@ -1863,7 +1895,7 @@
"name":"org.freedesktop.dbus.interfaces.Properties",
"allDeclaredMethods":true,
"allDeclaredClasses":true,
"methods":[{"name":"Get","parameterTypes":["java.lang.String","java.lang.String"] }, {"name":"GetAll","parameterTypes":["java.lang.String"] }]
"methods":[{"name":"Get","parameterTypes":["java.lang.String","java.lang.String"] }, {"name":"GetAll","parameterTypes":["java.lang.String"] }, {"name":"Set","parameterTypes":["java.lang.String","java.lang.String","java.lang.Object"] }]
},
{
"name":"org.freedesktop.dbus.interfaces.Properties$PropertiesChanged",
Expand Down
5 changes: 2 additions & 3 deletions src/main/java/org/asamk/signal/dbus/DbusManagerImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@
import org.asamk.signal.manager.api.UserStatus;
import org.asamk.signal.manager.api.UsernameLinkUrl;
import org.asamk.signal.manager.api.UsernameStatus;
import org.freedesktop.dbus.DBusMap;
import org.freedesktop.dbus.DBusPath;
import org.freedesktop.dbus.connections.impl.DBusConnection;
import org.freedesktop.dbus.exceptions.DBusException;
Expand Down Expand Up @@ -1063,7 +1062,7 @@ private List<MessageEnvelope.Data.Attachment> getAttachments(final Map<String, V
return List.of();
}

final List<DBusMap<String, Variant<?>>> attachments = getValue(extras, "attachments");
final List<Map<String, Variant<?>>> attachments = getValue(extras, "attachments");
return attachments.stream().map(a -> {
final String file = a.containsKey("file") ? getValue(a, "file") : null;
return new MessageEnvelope.Data.Attachment(a.containsKey("remoteId")
Expand All @@ -1090,7 +1089,7 @@ private List<MessageEnvelope.Data.Mention> getMentions(final Map<String, Variant
return List.of();
}

final List<DBusMap<String, Variant<?>>> mentions = getValue(extras, "mentions");
final List<Map<String, Variant<?>>> mentions = getValue(extras, "mentions");
return mentions.stream()
.map(a -> new MessageEnvelope.Data.Mention(new RecipientAddress(this.<String>getValue(a, "recipient")),
getValue(a, "start"),
Expand Down

0 comments on commit eca3c6f

Please sign in to comment.