When the method m is ( where m is the method to be invoked using reflection )
public static Optional<JsonNode> concat(ObjectNode entity, String separator, String fieldName1,
String fieldName2)
Then i am able to get the computed value ( where computed value is the value obtained using reflection )
While, when the method m is
public static Optional<JsonNode> concat(ObjectNode entity, String ...separatorAndField)
then i am able not able to get the computed value
I am invoking the method as follows:-
computedValue = (Optional<JsonNode>) m.invoke(null, methodArgs);
Note:- methodArgs is declared as an object array.