@Test public void testGetAndDestroyThreadLocalState() { assertNull("Unexpected pre-removal initial value", GrailsControllerStateKeeper.getAndDestroyThreadLocalState()); Object state = GrailsControllerStateKeeper.getState(); assertNotNull("No new state created", state); assertSame("Mismatched removed instance", state, GrailsControllerStateKeeper.getAndDestroyThreadLocalState()); assertNull("Unexpected new value after removal", GrailsControllerStateKeeper.getAndDestroyThreadLocalState()); }
public static State getAndDestroyThreadLocalState() { State res = localData.get(); localData.remove(); return res; }
GrailsControllerStateKeeper { public static State getAndDestroyThreadLocalState() { State res = localData.get(); localData.remove(); return res; } }
GrailsControllerStateKeeper { public static State getAndDestroyThreadLocalState() { State res = localData.get(); localData.remove(); return res; } private  GrailsControllerStateKeeper(); }
GrailsControllerStateKeeper { public static State getAndDestroyThreadLocalState() { State res = localData.get(); localData.remove(); return res; } private  GrailsControllerStateKeeper(); static void setThreadLocalController(String shortName, String fullName); static void setThreadLocalActionParams(List<KeyValPair<String, String>> params); static void setThreadLocalWebRequest(GrailsWebRequest request); static State getAndDestroyThreadLocalState(); }
GrailsControllerStateKeeper { public static State getAndDestroyThreadLocalState() { State res = localData.get(); localData.remove(); return res; } private  GrailsControllerStateKeeper(); static void setThreadLocalController(String shortName, String fullName); static void setThreadLocalActionParams(List<KeyValPair<String, String>> params); static void setThreadLocalWebRequest(GrailsWebRequest request); static State getAndDestroyThreadLocalState();  }