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
That means that the option name needs to be equal to the parameter name but there is no reason for this as it is the only parameter. That is not very intuitive and it is not documented anywhere (at least I didn't find it).
Expected behaviour:
When target method only has one parameter it should match independent of the option name.
When target method only has one parameter it should even match given input without option name or there should be an error message that the option is missing (currently it simply passes null even if the option is required).
It should be documented somewhere what the requirements for option matching are.
The text was updated successfully, but these errors were encountered:
Thanks for comments. This type of registration was originally added to support registering annotated methods and its "magical" behaviour was somewhat baked inside logic discovering those methods. I think you're a first one asking how this behaves so point taken as It wasn't intentionally left hard to use.
Current behaviour:
Currently the following registration (assuming there is some pojo named
command
)matches the method
but it would not match the method
That means that the option name needs to be equal to the parameter name but there is no reason for this as it is the only parameter. That is not very intuitive and it is not documented anywhere (at least I didn't find it).
Expected behaviour:
The text was updated successfully, but these errors were encountered: