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

BUGFIX: add the interface type if given when creating the proxy #198

Closed drivera73 closed 1 year ago

drivera73 commented 1 year ago

The interface type value "_type" is already null if not given as a parameter. But if given, it's being ignored while constructing the RemoteObject reference that will eventually be proxied. This leads to method invocations failing with "strange" errors (inapplicable instances of "access denied", for instance).

This correction caused the methods to at least be invoked correctly, and a test that verifies that this doesn't happen again by accident.

hypfvieh commented 1 year ago

Added patch and unit test. I had to change some stuff on the test to get it to work - but now it will fail without your patch and pass with your patch. I also fixed the same issue in DirectConnection.