Clarification on RESTWS-735


(Ryan Le) #1

For this ticket, we found this code segment:

and we were wondering which method calls exactly needed to be replaced with the newDelegate function that takes in the SimpleObject. The ticket is a little unclear and only mentions that the “old” method calls needed to be replaced, but we don’t exactly know what that old function is that needs to be replaced. We are just looking for some clarification on the matter. Thanks!


(Daniel Kayiwa) #2

Here is an example of where the replacement should happen: https://github.com/openmrs/openmrs-module-webservices.rest/blob/master/omod-common/src/main/java/org/openmrs/module/webservices/rest/web/resource/impl/DelegatingSubResource.java#L93

Look for all such calls and replace them with the new method which takes a SimpleObject.


(Ryan Le) #3

If there are no declarations of a SimpleObject in a method where newDelegate() is called, do I just leave the function call as is?


(Daniel Kayiwa) #4

That is correct.


(Ryan Le) #5

If that’s the case, the only place where we ever found a change to be made was the exact example you sent us. Are we missing something?


(Daniel Kayiwa) #6

Just do a pull request for any parts you find.


(Ryan Le) #7

how do we test our changes?


(Willa Mhawila) #8

In this case you just have to make sure the unit tests for that create() method where you have introduced the changes are passing as before. I think that would be sufficient because the contract hasn’t been changed, only the implementation.


(Ryan Le) #9

We’ve submitted our pull request, which can be found here: https://github.com/openmrs/openmrs-module-webservices.rest/pull/398

Please take a look when you have a moment! Thanks!