You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug] Failed to obtain the remote object using the DBusPath method. #290
Use the string method to obtain the correct result.
// this ok
var om = systemConn.getRemoteObject(
"org.bluez",
"/",
ObjectManager.class
);
Using the DBusPath method will result in an error.
// this error
var om = systemConn.getRemoteObject(
"org.bluez",
new DBusPath("/"),
ObjectManager.class
);
org.freedesktop.dbus.exceptions.InvalidObjectPathException: Invalid object path: /
at org.freedesktop.dbus.utils.DBusObjects.requireBase(DBusObjects.java:47)
at org.freedesktop.dbus.utils.DBusObjects.requireObjectPath(DBusObjects.java:163)
at org.freedesktop.dbus.utils.DBusObjects.requireObjectPath(DBusObjects.java:100)
at org.freedesktop.dbus.connections.impl.IRemoteObjectGetter.getRemoteObject(IRemoteObjectGetter.java:178)
at org.example.bluetooth.Demo.main(Demo.java:27)
I looked at the code, and the DBusObjects.requireObjectPath(_objectpath) validation failed.
DBusObjects.validateNotObjectPath(x.getPath()) returns false (which should be correct).
However, the !_validation.test(_input) in DBusObjects.requireBase causes an exception to be thrown even after successful validation.
Therefore, using the following path will pass the verification process:
var om = systemConn.getRemoteObject(
"org.bluez",
new DBusPath("/*(&(1"),
ObjectManager.class
);
Activity
Fixed hypfvieh#290