Skip to content

Commit

Permalink
small fix for array indexing UiPath#31
Browse files Browse the repository at this point in the history
  • Loading branch information
alcxs committed Dec 4, 2020
1 parent 3827d5c commit 5df3897
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Activities/Java/UiPath.Java/Service/Impl/JavaRequest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,10 @@ public void AddParametersToRequest(List<object> parameters, List<Type> types = n
{
return;
}

int index = -1;
foreach (object param in parameters)
{
index++;
if (param is JavaObject jo)
{
Parameters.Add(jo.Instance);
Expand All @@ -72,7 +73,7 @@ public void AddParametersToRequest(List<object> parameters, List<Type> 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
Expand Down

0 comments on commit 5df3897

Please sign in to comment.