@Test public void testNotDirtyWithRemoveMissing() { context.putString("1", "test"); assertTrue(context.isDirty()); context.putString("1", null); // remove an item that was present assertTrue(context.isDirty()); context.putString("1", null); // remove a non-existent item assertFalse(context.isDirty()); }
if (context.isDirty()) {
public AdaptedExecutionContext(ExecutionContext exeContext) throws InstantiationException, IllegalAccessException { this.hashCode = exeContext.hashCode(); this.dirtyFlag = exeContext.isDirty(); // Get a set of the entries Set<Entry<String, Object>> set = exeContext.entrySet(); // Get an iterator Iterator<Entry<String,Object>> i = set.iterator(); // Display elements while(i.hasNext()) { Entry<String, Object> me = i.next(); String name = me.getKey(); Object obj = getValue(me.getValue()); map.put(name, obj); } }
if (context.isDirty()) {
if (context.isDirty()) {
if (context.isDirty()) {