From: Maxim.Medvedev Date: Mon, 30 Jan 2012 11:14:30 +0000 (+0400) Subject: cleanup X-Git-Tag: rubymine/112.656~12 X-Git-Url: https://git.jetbrains.org/?p=idea%2Fcommunity.git;a=commitdiff_plain;h=f464286dfe5e696f255f62d063361dae641e7eef cleanup --- diff --git a/plugins/groovy/src/org/jetbrains/plugins/groovy/lang/psi/impl/statements/expressions/GrThisReferenceExpressionImpl.java b/plugins/groovy/src/org/jetbrains/plugins/groovy/lang/psi/impl/statements/expressions/GrThisReferenceExpressionImpl.java index a1913dc59ddc..930e63601c74 100644 --- a/plugins/groovy/src/org/jetbrains/plugins/groovy/lang/psi/impl/statements/expressions/GrThisReferenceExpressionImpl.java +++ b/plugins/groovy/src/org/jetbrains/plugins/groovy/lang/psi/impl/statements/expressions/GrThisReferenceExpressionImpl.java @@ -1,19 +1,18 @@ - /* - * Copyright 2000-2011 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. - */ +* Copyright 2000-2011 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.statements.expressions; import com.intellij.lang.ASTNode; @@ -35,7 +34,7 @@ import org.jetbrains.plugins.groovy.lang.psi.util.PsiUtil; */ public class GrThisReferenceExpressionImpl extends GrThisSuperReferenceExpressionBase implements GrThisReferenceExpression { - private static final NullableFunction TYPE_CALCULATOR = + private static final NullableFunction TYPE_CALCULATOR = new NullableFunction() { @Override public PsiType fun(GrThisReferenceExpressionImpl ref) { @@ -84,7 +83,7 @@ public class GrThisReferenceExpressionImpl extends GrThisSuperReferenceExpressio return GroovyPsiManager.getInstance(getProject()).getType(this, TYPE_CALCULATOR); } - private PsiType createType(PsiClass context) { + private PsiType createType(@NotNull PsiClass context) { final JavaPsiFacade facade = JavaPsiFacade.getInstance(context.getProject()); PsiElementFactory elementFactory = facade.getElementFactory(); @@ -93,8 +92,7 @@ public class GrThisReferenceExpressionImpl extends GrThisSuperReferenceExpressio //create instance of java.lang.Class if (context instanceof PsiAnonymousClass) { final PsiClassType type = ((PsiAnonymousClass)context).getBaseClassType(); - final PsiClass aClass = - facade.findClass(CommonClassNames.JAVA_LANG_CLASS, context.getResolveScope()); + final PsiClass aClass = facade.findClass(CommonClassNames.JAVA_LANG_CLASS, context.getResolveScope()); if (aClass != null) { return elementFactory.createType(aClass, type); }