Details
-
Bug
-
Status: Closed
-
Resolution: Fixed
-
6.1.30 EE GA3, 7.0.0 M3
-
6
-
3
-
CentOS 6
-
Oracle Sun JDK 6
-
Apache Tomcat 7.0
-
Chrome (latest)
-
MySQL 5.6
-
Desktop
Description
JSON WS adds a userId parameter as the authenticating user. So when we have 2 methods that are overloaded with one method having userId like...
PLEASE CHECK: LRDCOM-11968 for details. Here is the description through the example.
Let's say we have the following API methods:
foo(a) foo(a,b,c) foo(a,b,d)
`c` is default parameter and it is always set. When calling (sudo-call):
/foo/a,b,d
it may happens that you can't call the `foo(a,b,d)` but only `foo(a,b,c)`, since c is also available.
This fix tries to do the matching first without the default parameters. So the above call will always find the foo(a,b,d) method!
What happens when this is called?:
/foo/a,b
Previously, this call would invoke foo(a,b,c), since c is default parameter. However, after this change the foo(a) will be called, as there is matching method without default parameters - and that is the first match.