code: @Override
      @Trivial // traced with greater granularity within method
      public void taskStopping(ArrayList<com.ibm.wsspi.threadcontext.ThreadContext> contextAppliedToThread) {
          final boolean trace = TraceComponent.isAnyTracingEnabled();
  
          Throwable failure = null;
          for (int c = contextAppliedToThread.size() - 1; c >= 0; c--)
              try {
                  com.ibm.wsspi.threadcontext.ThreadContext appliedContext = contextAppliedToThread.get(c);
                  if (trace && tc.isDebugEnabled()) {
                      if (appliedContext instanceof DeferredClearedContext) {
                          Object clearedContextController = ((DeferredClearedContext) appliedContext).clearedContextController;
                          if (clearedContextController != null)
                              Tr.debug(this, tc, "restore context " + clearedContextController);
                      } else {
                          Tr.debug(this, tc, "restore context " + toString(appliedContext));
                      }
                  }
                  appliedContext.taskStopping();
              } catch (Throwable x) {
                  if (failure == null)
                      failure = x;
              }
  
          if (failure != null)
              if (failure instanceof RuntimeException)
                  throw (RuntimeException) failure;
              else if (failure instanceof Error)
                  throw (Error) failure;
              else
                  throw new RuntimeException(failure); // should never happen
      }
docs: Remove context from the thread (in reverse of the order in which is was applied) after a contextual operation completes.
  
  @param threadContext list of context previously applied to thread, ordered according to the order in which it was applied to the thread.