Skip to content

Fixed the cloudslang listIterator Issue - #1485

Open
NikhilPrakashrao wants to merge 4 commits into
masterfrom
workerSwitch
Open

Fixed the cloudslang listIterator Issue#1485
NikhilPrakashrao wants to merge 4 commits into
masterfrom
workerSwitch

Conversation

@NikhilPrakashrao

Copy link
Copy Markdown

No description provided.

//noinspection unchecked
sessionData.put(stepSessionKey, sessionContextObject);
} catch (Exception e) {
// Keep original object for this invocation.

@pintea-eugen pintea-eugen Aug 3, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could add logging as well (WARN level)

this.nodeNameWithDepth : parameterName;

Object sessionContextObject = sessionData.get(parameter);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't the migration logic necessary in this handleSessionContextArgument method?

@NikhilPrakashrao NikhilPrakashrao self-assigned this Aug 4, 2026
sessionData.put(parameter, sessionContextObject);
}

try {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, a little optimization will be to run this only when object is retrieved from sessionMap. So when it runs on the else branch, like this:

else {
try {
Class<?> expectedClass = Class.forName(objectClassName, true, classLoader);
if (!expectedClass.isInstance(sessionContextObject)) {
sessionContextObject = migrateSessionContextObject(sessionData, parameter,
sessionContextObject, expectedClass);
}
} catch (ClassNotFoundException e) {
throw new RuntimeException("Failed to load class [" + objectClassName + "]", e);
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants