You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description:
There is an issue with the ExecutionContext class where the dirty flag does not stay true when a null value is passed for a key that does not exist in the context. This behavior leads to unexpected results, especially when the dirty flag is used to determine if any modifications have been made to the context.
Steps to Reproduce:
Create a new ExecutionContext
Add a new key-value pair using put, which sets the dirty flag to true
Call put again with a different key and null value
Observe that the dirty flag is incorrectly reset to false even though no change occurred
Example Code:
@TestvoidtestDirty() {
ExecutionContextcontext = newExecutionContext();
context.put("1", "testString1");
assertTrue(context.isDirty()); // Expected to be truecontext.put("2", null);
assertTrue(context.isDirty()); // This fails, `dirty` flag is reset to false
}