if (getCache() == null) { setCache(new Collection[3]);
private void updateResultCache(Object[] oldCC, int indexToCache, Result[] arr, Collection<Object> ret) { synchronized (proxy()) { Collection[] cc = getCache(); if (cc != oldCC) { // don't change the cache when it is based on // outdated results return; } if (cc == null || cc == R.NO_CACHE) { // initialize the cache to indicate this result is in use setCache(cc = new Collection[3]); } if (arr == weakL.getResults()) { // updates the results, if the results have not been // changed during the computation of allInstances cc[indexToCache] = ret; } } } }
private void updateResultCache(Object[] oldCC, int indexToCache, Result[] arr, Collection<Object> ret) { synchronized (proxy()) { Collection[] cc = getCache(); if (cc != oldCC) { // don't change the cache when it is based on // outdated results return; } if (cc == null || cc == R.NO_CACHE) { // initialize the cache to indicate this result is in use setCache(cc = new Collection[3]); } if (arr == weakL.getResults()) { // updates the results, if the results have not been // changed during the computation of allInstances cc[indexToCache] = ret; } } } }