docs: @Override
      public void taskStopping(ArrayList<ThreadContext> threadContext) {
          final boolean trace = TraceComponent.isAnyTracingEnabled();
  
          Throwable failure = null;
          for (int c = threadContext.size() - 1; c >= 0; c--)
              try {
                  if (trace && tc.isDebugEnabled())
                      Tr.debug(this, tc, "taskStopping " + toString(threadContext.get(c)));
                  threadContext.get(c).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
      }