From 40c7e80a99ed80cdff215e6ae8893ddaa0dfbcf7 Mon Sep 17 00:00:00 2001 From: Daniil Ovchinnikov Date: Tue, 17 Apr 2018 17:26:52 +0300 Subject: [PATCH] [groovy] partially revert d98b845 --- .../groovy/lang/psi/impl/GrMapType.java | 21 ++++++++++++++----- .../groovy/lang/psi/impl/GrTupleType.java | 20 ++++++++++++++---- 2 files changed, 32 insertions(+), 9 deletions(-) diff --git a/plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/lang/psi/impl/GrMapType.java b/plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/lang/psi/impl/GrMapType.java index 86dfde57fea1..e76cc4f8d952 100644 --- a/plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/lang/psi/impl/GrMapType.java +++ b/plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/lang/psi/impl/GrMapType.java @@ -1,4 +1,18 @@ -// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. +/* + * Copyright 2000-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.jetbrains.plugins.groovy.lang.psi.impl; @@ -19,8 +33,6 @@ import org.jetbrains.plugins.groovy.lang.psi.util.GroovyCommonClassNames; import java.util.*; -import static com.intellij.openapi.util.RecursionManager.doPreventingRecursion; - /** * @author peter */ @@ -85,8 +97,7 @@ public abstract class GrMapType extends GrLiteralClassType { @Override @NotNull public PsiType[] getParameters() { - PsiType[] parameters = doPreventingRecursion(this, false, () -> myParameters.getValue()); - return parameters == null ? PsiType.EMPTY_ARRAY : parameters; + return myParameters.getValue(); } @Override diff --git a/plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/lang/psi/impl/GrTupleType.java b/plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/lang/psi/impl/GrTupleType.java index cb15bbe008c7..1a7a4f9b64bb 100644 --- a/plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/lang/psi/impl/GrTupleType.java +++ b/plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/lang/psi/impl/GrTupleType.java @@ -1,9 +1,22 @@ -// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. +/* + * Copyright 2000-2014 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.jetbrains.plugins.groovy.lang.psi.impl; import com.intellij.openapi.util.Comparing; -import com.intellij.openapi.util.RecursionManager; import com.intellij.openapi.util.VolatileNotNullLazyValue; import com.intellij.openapi.util.text.StringUtil; import com.intellij.pom.java.LanguageLevel; @@ -64,8 +77,7 @@ public abstract class GrTupleType extends GrLiteralClassType { @Override @NotNull public PsiType[] getParameters() { - PsiType[] parameters = RecursionManager.doPreventingRecursion(this, false, () -> myParameters.getValue()); - return parameters == null ? PsiType.EMPTY_ARRAY : parameters; + return myParameters.getValue(); } @Override