/** * Method for de-registering the current context - should always and only be * used by in conjunction with a matching {@link #register(StepExecution)} * to ensure that {@link #getContext()} always returns the correct value. * Does not call {@link StepContext#close()} - that is left up to the caller * because he has a reference to the context (having registered it) and only * he has knowledge of when the step actually ended. */ public static void close() { StepContext oldSession = getContext(); if (oldSession == null) { return; } decrement(); }