V put(int key, int hash, V value, boolean onlyIfAbsent) {
      lock();
      try {
        int c = count;
        if (c++ > threshold) // ensure capacity
        {
          rehash();
        }
        HashEntry<V>[] tab = table;
        int index = hash & (tab.length - 1);
        HashEntry<V> first = tab[index];
        HashEntry<V> e = first;
        while (e != null && (e.hash != hash || key != e.key)) {
          e = e.next;
        }

        V oldValue;
        if (e != null) {
          oldValue = e.value;
          if (!onlyIfAbsent) {
            e.value = value;
          }
        } else {
          oldValue = null;
          ++modCount;
          tab[index] = new HashEntry<>(key, hash, first, value);
          count = c; // write-volatile
        }
        return oldValue;
      } finally {
        unlock();
      }
    }
Reads value field of an entry under lock. Called if value field ever appears to be null. This
is possible only if a compiler happens to reorder a HashEntry initialization with its table
assignment, which is legal under memory model but is not known to ever occur.
geode-core/src/main/java/org/apache/geode/internal/ObjIdConcurrentMap.java