Closed baubakg closed 1 month ago
Same thing works fine for lists though.
public int testArrays6(String mm, List<String> b) {
return 1+b.length;
}
Problem does not show up if call is done as a simple Java call using the JavaCalls Object:
@Test
public void issue176_callingMethodAcceptingStringAndArray() {
JavaCalls l_myJavaCall = new JavaCalls();
CallContent l_cc1 = new CallContent();
l_cc1.setClassName(SimpleStaticMethods.class.getTypeName());
l_cc1.setMethodName("methodAcceptingStringAndArray");
String[] l_array = new String[]{"value1", "value2"};
l_cc1.setArgs(new Object[]{"ASD", l_array});
l_myJavaCall.getCallContent().put("fetchResults", l_cc1);
JavaCallResults jcr = l_myJavaCall.submitCalls();
assertThat("we should have succeeded", jcr.getReturnValues().keySet(), Matchers.containsInAnyOrder("fetchResults"));
}
There are two problems:
Expected Behaviour
A method should be able to accept an array under all circumstances
Actual Behaviour
We get an errror:
Reproduce Scenario (including but not limited to)
Sample Code that illustrates the problem
create method like :
Logs taken while reproducing problem