Jens Wilke opened SPR-17053 and commented

The implementation of Cache.putIfAbsent for JCache is not atomic as the methods contract requires.

@Override
public ValueWrapper putIfAbsent(Object key, Object value) {
 boolean set = this.cache.putIfAbsent(key, toStoreValue(value));
 return (set ? null : get(key));
}

The semantic could be implemented correctly via the Cache.invoke and the EntryProcessor. If okay I can do an PR.

This is only a very minor issue. So far I can see putIfAbsent is actually not used.


Affects: 5.0.7