[groovy] partially revert d98b845

This commit is contained in:
Daniil Ovchinnikov
2018-04-17 17:34:50 +03:00
parent b00a966f20
commit 40c7e80a99
2 changed files with 32 additions and 9 deletions
@@ -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
@@ -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