From 992b57a90c4e687cb21786c2476012d7fce5dbea Mon Sep 17 00:00:00 2001 From: Sergey Evdokimov Date: Mon, 20 Jun 2011 13:50:13 +0400 Subject: [PATCH] Fix: IDEA-70991 (Grails GSP tag highlights an error on "field" attribute: "cannot resolve symbol 'f'") --- .../plugins/groovy/util/LightCacheKey.java | 24 +------------------ 1 file changed, 1 insertion(+), 23 deletions(-) diff --git a/plugins/groovy/src/org/jetbrains/plugins/groovy/util/LightCacheKey.java b/plugins/groovy/src/org/jetbrains/plugins/groovy/util/LightCacheKey.java index c44b81ba0fa8..50f3649c794e 100644 --- a/plugins/groovy/src/org/jetbrains/plugins/groovy/util/LightCacheKey.java +++ b/plugins/groovy/src/org/jetbrains/plugins/groovy/util/LightCacheKey.java @@ -2,7 +2,6 @@ package org.jetbrains.plugins.groovy.util; import com.intellij.openapi.util.Key; import com.intellij.openapi.util.Pair; -import com.intellij.openapi.util.UserDataHolder; import com.intellij.openapi.util.UserDataHolderEx; import com.intellij.psi.PsiElement; import org.jetbrains.annotations.NotNull; @@ -29,28 +28,7 @@ public class LightCacheKey { return userData.second; } - /** - * - * @param holder - * @param defaultValue Value which will put to cache if cache is empty or outdated. Other threads will get this value. - * @return - */ - public T getCachedValue(PsiElement holder, @NotNull T defaultValue) { - Pair userData = holder.getUserData(key); - - long modificationCount = holder.getManager().getModificationTracker().getModificationCount(); - if (userData != null && modificationCount == userData.first) { - return userData.second; - } - - Pair newUserData = Pair.create(modificationCount, defaultValue); - - - - return null; - } - - public T putCachedValue(PsiElement holder, @Nullable T value) { + public T putCachedValue(PsiElement holder, @NotNull T value) { long modificationCount = holder.getManager().getModificationTracker().getModificationCount(); Pair pair = Pair.create(modificationCount, value);