Invalid elements in JavaScriptResolution for collection

Description

I can reproduce an issue in which when a List of complex objects is used as the argument for a JavaScriptResolution, some of the elements of the resulting JavaScript array are not what they should be.

In my case, I have a List<RoutableForm> on the Java side, in which each RoutableForm has an attribute "category", which is an object with a couple attributes of its own. In the JavaScript that is sent in the response, most of the elements of the array are exactly what I would expect. However, 2 of the elements are Category objects instead of RoutableForm objects.

I can reproduce this issue with 2 elements being somewhat consistently invalid, but interestingly enough, the 2 indices in error seems to change from one trial to the next. I am quite confident that the ordering in the Java List is the same each time, so I'm not sure why it wouldn't be the elements at the same 2 indices each time that have an issue.

In the attached document, I have replaced all of the actual string literal values with "abc" in order to not release my client's data. It is the JavaScript created by the JavaScriptResolution with this collection as an argument.

You can see that _sj_root_516091402 is the main object returned when it is eval'd.
On line 1072, this main root object is set to _sj_2020112488.
Doing a search for _sj_2020112488, you can see that almost all of its indices are set to RoutableForm objects (which have attributes activityName, formNumber, routesToRoleName, formName, formDescr, and categoryName). However, if you look at _sj_2020112488[62], you see that it is set to a Category object instead (which has parameters name and desc, along with an array called "forms" that is empty for all Category objects currently).

This Category object should not be directly in the main array. I would expect an individual RoutableForm object in the array to have a reference to it, but it should not be directly in the main array.

Environment

Don't know if this is relevant, but WAS 6.1 on Windows XP

Status

Assignee

Unassigned

Reporter

"Failed to Retrieve User "

Labels

None

Tester

None

Affects versions

Release 1.5.3

Priority

Major
Configure