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

@throws NullPointerException if any of the arguments are null
geode-core/src/main/java/org/apache/geode/internal/util/concurrent/CustomEntryConcurrentHashMap.java