-
Type:
Bug
-
Status: Closed
-
Resolution: Fixed
-
Affects Version/s: 6.1.30 EE GA3, 7.0.0 M3
-
Fix Version/s: 7.0.0 M2
-
Component/s: Web Services, Web Services > JSON WS
-
Labels:
-
Story Points:6
-
Fix Priority:3
-
OS:CentOS 6
-
JDK:Oracle Sun JDK 6
-
Application Servers:Apache Tomcat 7.0
-
Browsers:Chrome (latest)
-
Databases:MySQL 5.6
-
Device Type:Desktop
-
Git Pull Request:
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.