Data<T> (@NotNull Computable<CachedValueProvider.Result<T>> doCompute) { CachedValueProvider.Result<T> result; CachedValueProfiler.ValueTracker tracker; if (CachedValueProfiler.isProfiling()) { try (CachedValueProfiler.Frame frame = CachedValueProfiler.newFrame()) { result = doCompute.compute(); tracker = result == null ? null : frame.newValueTracker(result); } } else { result = doCompute.compute(); tracker = null; } if (result == null) { return new Data<>(null, ArrayUtilRt.EMPTY_OBJECT_ARRAY, ArrayUtil.EMPTY_LONG_ARRAY, null); } T value = result.getValue(); Object[] inferredDependencies = normalizeDependencies(value, result.getDependencyItems()); long[] inferredTimeStamps = new long[inferredDependencies.length]; for (int i = 0; i < inferredDependencies.length; i++) { inferredTimeStamps[i] = getTimeStamp(inferredDependencies[i]); } return new Data<>(value, inferredDependencies, inferredTimeStamps, tracker); }