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

Fix signal interface generation #146

Closed poeschel closed 3 years ago

poeschel commented 3 years ago

Interface generation for signals is wrong in some way. This simple signal

`

`

using InterfaceCodeGenerator generates to this interface ` public interface Example extends DBusInterface { public static class ExampleSignal extends DBusSignal {

        private final String newState;

        public ExampleSignal(String _path, String _interfaceName, String _newState) throws DBusException {
            super(_path, _interfaceName);
            this.newState = _newState;
        }

        public String getNewState() {
            return newState;
        }
    }
}

`

which is wrong. The constructor should be like this instead: public ExampleSignal(String _path, String _newState) throws DBusException { super(_path, _newState); this.newState = _newState; }

Explained a bit more in the commit message.