-
Couldn't load subscription status.
- Fork 2.5k
Closed
Milestone
Description
Issue Description
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 thedirtyflag totrue - Call
putagain with a different key andnullvalue - Observe that the
dirtyflag is incorrectly reset tofalseeven though no change occurred
Example Code:
@Test
void testDirty() {
ExecutionContext context = new ExecutionContext();
context.put("1", "testString1");
assertTrue(context.isDirty()); // Expected to be true
context.put("2", null);
assertTrue(context.isDirty()); // This fails, `dirty` flag is reset to false
}injae-kim and GGHDMSinjae-kim and GGHDMS