According to the documentation at http://next.openhab.org/addons/bindings/pushover/ the second argument to sendMessage() should be optional, but when trying to call the method with only one argument I get the following error:
Invalid number of arguments. The method sendMessage(ThingActions, String, String) is not applicable for the arguments (ThingActions,String);
When providing two arguments (message and title) everything works as it should.
This is the version of the binding provided in 3.0 M5.
Yes, that is right. But adding hundreds of methods to cover all possible combinations of parameters is not a good design. As stated in https://github.com/openhab/openhab-addons/pull/8586#issuecomment-716359035 I would rather investigate on exposing the message builder which is way more flexible and a basic pattern.
Oh, wait. I think this might be my fault. I interpreted the "@Nullable" in the documentation as the second argument being optional, but it isn't, is it? I guess that means I have to provide the argument anyway, just that it can be null?
(btw, I wonder what happened to the link to the documentation that I put in this ticket, it certainly doesn't link to the place it should...)
(btw, I wonder what happened to the link to the documentation that I put in this ticket, it certainly doesn't link to the place it should...)
It was:
[http://next.openhab.org/addons/bindings/pushover/](url)
But it should have been used like:
[Pushover Documentation](http://next.openhab.org/addons/bindings/pushover/)
If you don't want to provide a text for the link... just post the link :wink:
Oh, wait. I think this might be my fault. I interpreted the "@nullable" in the documentation as the second argument being optional, but it isn't, is it? I guess that means I have to provide the argument anyway, just that it can be null?
Yes you still need to provide a null parameter value for @Nullable values.
Understood. Guess I'll close this ticket then. I guess the documentation could be a little bit more clear, but maybe it is for people in the world of Java :-)