Fixed the cloudslang listIterator Issue - #1485
Conversation
| //noinspection unchecked | ||
| sessionData.put(stepSessionKey, sessionContextObject); | ||
| } catch (Exception e) { | ||
| // Keep original object for this invocation. |
There was a problem hiding this comment.
Could add logging as well (WARN level)
| this.nodeNameWithDepth : parameterName; | ||
|
|
||
| Object sessionContextObject = sessionData.get(parameter); | ||
|
|
There was a problem hiding this comment.
Isn't the migration logic necessary in this handleSessionContextArgument method?
| sessionData.put(parameter, sessionContextObject); | ||
| } | ||
|
|
||
| try { |
There was a problem hiding this comment.
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);
}
No description provided.