diff --git a/Activities/Java/UiPath.Java/Service/Impl/JavaRequest.cs b/Activities/Java/UiPath.Java/Service/Impl/JavaRequest.cs index 57ede128..c7dc8968 100644 --- a/Activities/Java/UiPath.Java/Service/Impl/JavaRequest.cs +++ b/Activities/Java/UiPath.Java/Service/Impl/JavaRequest.cs @@ -61,9 +61,10 @@ public void AddParametersToRequest(List parameters, List types = n { return; } - + int index = -1; foreach (object param in parameters) { + index++; if (param is JavaObject jo) { Parameters.Add(jo.Instance); @@ -72,7 +73,7 @@ public void AddParametersToRequest(List parameters, List types = n { if (param==null) { - var type = types[parameters.IndexOf(param)]; + var type = types[index]; if (typeof(IEnumerable).IsAssignableFrom(type) && type != typeof(string)) { Parameters.Add(new JavaObjectInstance