docs: private void checkIfCancelled()
      {
          // If a cancel has been committed then the timer "does not exist",
          // unless the cancel occurred after the timer started running
          // and the current thread is for that running timeout method.
          if (ivDestroyed && ivTimeoutThread != Thread.currentThread()) {
              String msg = "Timer with ID " + ivTaskId + " has been canceled.";
              if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                  Tr.debug(tc, "checkIfCancelled: NoSuchObjectLocalException : " + msg);
              throw new NoSuchObjectLocalException(msg);
          }
  
          // If cancel was called during the current transaction then the timer
          // "does not exist", regardless of whether or not the current thread
          // is a running timeout method.
          ContainerTx tx = ivContainer.getCurrentContainerTx();
          if (tx != null && tx.timersCanceled != null && tx.timersCanceled.containsValue(this)) {
              String msg = "Timer with ID " + ivTaskId + " has been canceled in the current transaction.";
              if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                  Tr.debug(tc, "checkIfCancelled: NoSuchObjectLocalException : " + msg);
              throw new NoSuchObjectLocalException(msg);
          }
      }