Variable renamed

This commit is contained in:
Andrey Breslav
2012-12-17 14:43:45 +04:00
parent 6b9c6e3d95
commit f64487eb8b
@@ -76,9 +76,9 @@ public final class AnalyzerFacadeWithCache {
@NotNull final Function<JetFile, Collection<JetFile>> declarationProvider) { @NotNull final Function<JetFile, Collection<JetFile>> declarationProvider) {
// Need lock for getValue(), because parallel threads can start evaluation of compute() simultaneously // Need lock for getValue(), because parallel threads can start evaluation of compute() simultaneously
synchronized (lock) { synchronized (lock) {
CachedValue<AnalyzeExhaust> bindingContextCachedValue = file.getUserData(ANALYZE_EXHAUST_FULL); CachedValue<AnalyzeExhaust> result = file.getUserData(ANALYZE_EXHAUST_FULL);
if (bindingContextCachedValue == null) { if (result == null) {
bindingContextCachedValue = result =
CachedValuesManager.getManager(file.getProject()).createCachedValue(new CachedValueProvider<AnalyzeExhaust>() { CachedValuesManager.getManager(file.getProject()).createCachedValue(new CachedValueProvider<AnalyzeExhaust>() {
@Override @Override
public Result<AnalyzeExhaust> compute() { public Result<AnalyzeExhaust> compute() {
@@ -107,10 +107,10 @@ public final class AnalyzerFacadeWithCache {
} }
}, false); }, false);
file.putUserData(ANALYZE_EXHAUST_FULL, bindingContextCachedValue); file.putUserData(ANALYZE_EXHAUST_FULL, result);
} }
return bindingContextCachedValue.getValue(); return result.getValue();
} }
} }
@@ -150,13 +150,13 @@ public final class AnalyzerFacadeWithCache {
// Need to resolve bodies in given file and all in the same package // Need to resolve bodies in given file and all in the same package
return AnalyzerFacadeProvider.getAnalyzerFacadeForFile(file).analyzeBodiesInFiles( return AnalyzerFacadeProvider.getAnalyzerFacadeForFile(file).analyzeBodiesInFiles(
file.getProject(), file.getProject(),
Collections.<AnalyzerScriptParameter>emptyList(), Collections.<AnalyzerScriptParameter>emptyList(),
new JetFilesProvider.SameJetFilePredicate(file), new JetFilesProvider.SameJetFilePredicate(file),
new DelegatingBindingTrace(analyzeExhaustHeaders.getBindingContext(), new DelegatingBindingTrace(analyzeExhaustHeaders.getBindingContext(),
"trace to resolve bodies in file", file.getName()), "trace to resolve bodies in file", file.getName()),
context, context,
moduleConfiguration); moduleConfiguration);
} }
@NotNull @NotNull