From bdf35bd0a19e5f88815d9b97dbba14b0dc2f2503 Mon Sep 17 00:00:00 2001 From: Roman Shevchenko Date: Fri, 21 Feb 2014 14:58:12 +0100 Subject: [PATCH] Cleanup (unneeded cast) --- .../codeStyle/JavaCodeStyleManagerImpl.java | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/java/java-impl/src/com/intellij/psi/impl/source/codeStyle/JavaCodeStyleManagerImpl.java b/java/java-impl/src/com/intellij/psi/impl/source/codeStyle/JavaCodeStyleManagerImpl.java index 10d4584be81d..7749d956c318 100644 --- a/java/java-impl/src/com/intellij/psi/impl/source/codeStyle/JavaCodeStyleManagerImpl.java +++ b/java/java-impl/src/com/intellij/psi/impl/source/codeStyle/JavaCodeStyleManagerImpl.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 JetBrains s.r.o. + * 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. @@ -13,10 +13,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - -/* - * @author max - */ package com.intellij.psi.impl.source.codeStyle; import com.intellij.lang.ASTNode; @@ -47,6 +43,9 @@ import org.jetbrains.annotations.Nullable; import java.beans.Introspector; import java.util.*; +/** + * @author max + */ public class JavaCodeStyleManagerImpl extends JavaCodeStyleManager { private static final Logger LOG = Logger.getInstance("#com.intellij.psi.impl.source.codeStyle.JavaCodeStyleManagerImpl"); @@ -87,8 +86,7 @@ public class JavaCodeStyleManagerImpl extends JavaCodeStyleManager { } @Override - public void shortenClassReferences(@NotNull PsiElement element, int startOffset, int endOffset) - throws IncorrectOperationException { + public void shortenClassReferences(@NotNull PsiElement element, int startOffset, int endOffset) throws IncorrectOperationException { CheckUtil.checkWritable(element); if (SourceTreeToPsiMap.hasTreeElement(element)) { final ReferenceAdjuster adjuster = ReferenceAdjuster.Extension.getReferenceAdjuster(element.getLanguage()); @@ -164,7 +162,7 @@ public class JavaCodeStyleManagerImpl extends JavaCodeStyleManager { ContainerUtil.addAll(redundant, imports); redundant.removeAll(allImports); for (PsiImportStatementBase importStatement : imports) { - if (importStatement instanceof JspxImportStatement && ((JspxImportStatement)importStatement).isForeignFileImport()) { + if (importStatement instanceof JspxImportStatement && importStatement.isForeignFileImport()) { redundant.remove(importStatement); } } @@ -481,7 +479,7 @@ public class JavaCodeStyleManagerImpl extends JavaCodeStyleManager { if (fromLiterals != null) { ContainerUtil.addAll(names, fromLiterals); } - + ContainerUtil.addAll(names, suggestVariableNameByExpressionOnly(expr, variableKind, correctKeywords, false).names); ContainerUtil.addAll(names, suggestVariableNameByExpressionPlace(expr, variableKind, correctKeywords).names);