hypfvieh / dbus-java

Improved version of java DBus library provided by freedesktop.org (https://dbus.freedesktop.org/doc/dbus-java/)
https://hypfvieh.github.io/dbus-java/
MIT License
185 stars 73 forks source link

Finding an exported object with introspection not working anymore in 3.2.1 #103

Closed AsamK closed 4 years ago

AsamK commented 4 years ago

When exporting an object with an objectPath with more than one level (e.g. /org/example/Path), the object can't be found with introspection anymore. This used to work with version 3.2.0.

Example:

DBusConnection conn = DBusConnection.getConnection(DBusConnection.DBusBusType.SESSION);
conn.requestBusName("org.example.java.dbus");
ExportClass ex = new ExportClass();
conn.exportObject("/org/example/Path", ex);

When inspecting the root object with:

qdbus org.example.java.dbus / org.freedesktop.DBus.Introspectable.Introspect

a service running with version 3.2.1 doesn't show the org node:

<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN" "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
<node name="/">
</node>

a service using version 3.2.0 worked as expected:

<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN" "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
<node name="/">
<node name="org"/>
</node>

Might be related to this bugfix: 93c512f06ea8dfe8b756e96d2f939a13ecfccf1b