You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description:
The result of a ConcurrentMap#put is captured for handling later in the method. As put has a side effect, the logic changes if the declaration is moved downward.
Code Sample demonstrating the issue:
varprior = cache.put(uri, cachedPath);
if (ref == null) {
returnPathRef.create(cachedPath, 1);
}
if (prior == null) {
ref.count().incrementAndGet();
}