docs: public void preDelete(Transaction transaction)
                      throws ObjectManagerException
      {
          if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled())
              trace.entry(this, cclass,
                          "preDelete",
                          "transaction=" + transaction + "(Transaction)");
  
          synchronized (headSequenceNumberLock) {
              tailSequenceNumberLock.lock();
              try {
                  // Defect 322295
                  // We only need to do this check at runtime. At recovery time we can rely on the
                  // check been done before the OM went down. Also in some cases the subList array may
                  // be padded with nulls depending on how many were successfully deleted from the
                  // object store before the OM went down.
                  if (transaction.getObjectManagerStateState() != ObjectManagerState.stateReplayingLog) {
                      // Check that the sublists are empty.
                      for (int i = 0; i < subLists.length; i++) {
                          // The list must be empty, apart from links this transaction will delete.
                          Token nextToken = subLists[i].head;
                          while (nextToken != null) {
                              LinkedList.Link nextLink = (LinkedList.Link) nextToken.getManagedObject();
                              if (nextLink.willBeDeleted(transaction))
                                  nextToken = nextLink.next;
                              else {
                                  if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled())
                                      trace.exit(this, cclass,
                                                 "preDelete",
                                                 "via CollentionNotEmptyException"
                                                                 + "size()=" + size() + "(long)"
                                                                 + " nextLink.state=" + nextLink.state + "(int) " + LinkedList.Link.stateNames[nextLink.state]
                                                                 + "\n nextLink.getTransactionLock()=" + nextLink.getTransactionLock() + "(TransactionLock)"
                                                      );
  
                                  throw new CollectionNotEmptyException(this, size(), transaction);
                                  //System.out.println("LinkedList.preDelete nextLink.state ="+nextLink.state+" "+LinkedList.Link.stateNames[nextLink.state]
                                  //                                                                                              +"\n nextLink.getTransactionLock()="+nextLink.getTransactionLock() 
                                  //                                                                                              );
                                  //break;
                              } // if (  nextLink.state == Link.stateToBeDeleted...
                          } // while (nextToken != null).
  
                      } // for subLists.
                  } // if not recovering...
  
                  super.preDelete(transaction); // Also takes a lock.
                  // Visibility is now restricted to our transaction only.
  
                  // Now delete the sublists. 
                  // If we are recovering, the delete of the sublists will have already been done
                  // so don't do it again.
                  if (transaction.getObjectManagerStateState() != ObjectManagerState.stateReplayingLog) {
                      transaction.optimisticReplace(null, null, java.util.Arrays.asList(subLists), null);
                  } // if not recovering...
  
              } finally {
                  if (tailSequenceNumberLock.isHeldByCurrentThread())
                      tailSequenceNumberLock.unlock();
              } // try (tailSequenceNumberLock).
          } // synchronized (headSequenceNumberLock).
  
          if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled())
              trace.exit(this, cclass,
                         "preDelete");
      }