Skip to content

Commit

Permalink
Update to dbus-java 4.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
purejava committed May 24, 2022
1 parent 1a1b79c commit 259b3a2
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Creating a folder in a wallet can be done like this:
```java
package org.example;

import org.freedesktop.dbus.connections.impl.DBusConnection;
import org.freedesktop.dbus.connections.impl.DBusConnectionBuilder;
import org.freedesktop.dbus.exceptions.DBusException;
import org.kde.KWallet;

Expand All @@ -39,7 +39,7 @@ public class App {
DBusConnection connection = null;

try {
connection = DBusConnection.getConnection(DBusConnection.DBusBusType.SESSION);
connection = DBusConnectionBuilder.forSessionBus().withShared(false).build();

var service = connection.getRemoteObject("org.kde.kwalletd5",
"/modules/kwalletd5", KWallet.class);
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
<dependency>
<groupId>com.github.hypfvieh</groupId>
<artifactId>dbus-java-core</artifactId>
<version>4.0.0</version>
<version>4.1.0</version>
</dependency>

<dependency>
Expand Down
3 changes: 2 additions & 1 deletion src/test/java/org/purejava/Context.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package org.purejava;

import org.freedesktop.dbus.connections.impl.DBusConnection;
import org.freedesktop.dbus.connections.impl.DBusConnectionBuilder;
import org.freedesktop.dbus.exceptions.DBusException;
import org.slf4j.Logger;

Expand All @@ -16,7 +17,7 @@ public Context(Logger log) {

public void ensureService() {
try {
connection = DBusConnection.getConnection(DBusConnection.DBusBusType.SESSION);
connection = DBusConnectionBuilder.forSessionBus().withShared(false).build();
} catch (DBusException e) {
log.error(e.toString(), e.getCause());
}
Expand Down

0 comments on commit 259b3a2

Please sign in to comment.