docs: @Override
      @SuppressWarnings("null")
      public Object removeAndDiscard(java.lang.Object key, boolean dropRef)
                      throws DiscardException
      {
          if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
              Tr.entry(tc, "removeAndDiscard",
                       new Object[] { key, new Boolean(dropRef) });
  
          Bucket bucket = getOrCreateBucketForKey(key); // d739870
          Object object = null;
  
          try {
              synchronized (bucket)
              {
                  Element element = bucket.removeByKey(key, dropRef);
                  object = element != null ? element.object : null;
  
                  if (object != null) {
                      // Inform the DiscardStrategy that we just removed an oject
                      if (discardStrategy != null) {
                          try {
                              discardStrategy.discardObject(this, element.key,
                                                            element.object);
                          } catch (Exception ex) {
                              FFDCFilter.processException(ex, CLASS_NAME + ".removeAndDiscard",
                                                          "540", this);
                              Tr.warning(tc, "EXCEPTION_THROWN_BY_DISCARD_STRATEGY_CNTR0054W"
                                         , new Object[] { element, ex }); //p111002.4
                              element = null;
                              throw new DiscardException(ex, key);
                          }
                      }
                  }
              }
          } finally {
  
              if (object != null) {
                  synchronized (this) {
                      // ACK! This is going to be a choke point
                      numObjects--;
                  }
              }
          }
  
          if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
              Tr.exit(tc, "removeAndDiscard", object);
  
          return object;
      }