@Override
  public V replace(final K key, final V value) {
    if (value == null) {
      throw new NullPointerException();
    }
    // throws NullPointerException if key null
    final int hash = entryCreator.keyHashCode(key, compareValues);
    return segmentFor(hash).replace(key, hash, value);
  }
{@inheritDoc}

@return the previous value associated with the specified key, or <tt>null</tt> if there was no
        mapping for the key
@throws NullPointerException if the specified key or value is null
geode-core/src/main/java/org/apache/geode/internal/util/concurrent/CustomEntryConcurrentHashMap.java