Skip to content

Commit

Permalink
Update dbus-java to 5.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
purejava committed Jan 30, 2024
1 parent d7e0dcf commit 7be43e1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,13 @@
<dependency>
<groupId>com.github.hypfvieh</groupId>
<artifactId>dbus-java-core</artifactId>
<version>4.3.1</version>
<version>5.0.0</version>
</dependency>

<dependency>
<groupId>com.github.hypfvieh</groupId>
<artifactId>dbus-java-transport-native-unixsocket</artifactId>
<version>4.3.1</version>
<version>5.0.0</version>
</dependency>

<!-- https://mvnrepository.com/artifact/org.junit.jupiter/junit-jupiter-api -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import org.freedesktop.dbus.connections.impl.DBusConnection;
import org.freedesktop.dbus.exceptions.DBusException;
import org.freedesktop.dbus.messages.MethodCall;
import org.freedesktop.dbus.types.Variant;
import org.purejava.kwallet.Static;
import org.slf4j.Logger;
Expand All @@ -29,11 +28,8 @@ public MessageHandler(DBusConnection connection) {

public Object[] send(String service, String path, String iface, String method, String signature, Object... args) {
try {
var message = new MethodCall(
service,
path,
iface,
method, (byte) 0, signature, args);
var msgFactory = connection.getMessageFactory();
var message = msgFactory.createMethodCall(service, path, iface, method, (byte) 0, signature, args);

if (LOG.isTraceEnabled()) LOG.trace(String.valueOf(message));
connection.sendMessage(message);
Expand All @@ -47,7 +43,7 @@ public Object[] send(String service, String path, String iface, String method, S
LOG.debug(Arrays.deepToString(parameters));
}

if (response instanceof org.freedesktop.dbus.errors.Error) {
if (response instanceof org.freedesktop.dbus.messages.Error) {
var error = response.getName();
switch (error) {
case "org.freedesktop.DBus.Error.NoReply",
Expand Down

0 comments on commit 7be43e1

Please sign in to comment.