LocalChangeListImpl (@Nullable ListData data) { if (data == null) return null; if (myReadOnlyChangesCache == null || myReadOnlyChangesCacheInvalidated.get()) { myReadOnlyChangesCacheInvalidated.set(false); myReadOnlyChangesCache = getChangesMapping(); } Set<Change> cachedChanges = myReadOnlyChangesCache.get(data); Set<Change> changes = cachedChanges != null ? Collections.unmodifiableSet(cachedChanges) : Collections.emptySet(); return buildChangeListFrom(data) .setChangesCollection(changes) .build(); }