From fde40b00d3eb41436ba01828df29ab50230b827e Mon Sep 17 00:00:00 2001 From: Sergey Ignatov Date: Mon, 4 Feb 2019 20:01:44 +0300 Subject: [PATCH] remove redundant modifiers --- java/compiler/tests/com/intellij/compiler/IOUtilTest.java | 2 +- .../src/com/intellij/ide/PsiActionSupportFactory.java | 2 +- .../src/com/intellij/openapi/wm/AppIconScheme.java | 6 +++--- platform/platform-api/src/com/intellij/ui/ListUtil.java | 4 ++-- .../src/com/intellij/ui/ReorderableListController.java | 2 +- .../remoteServer/agent/util/log/TerminalListener.java | 2 +- .../intellij/util/containers/ConcurrentLongObjectMap.java | 2 +- .../connections/ssh/SmPublicKeyAuthentification.java | 4 ++-- .../intellij/openapi/cvsIntegration/DateOrRevision.java | 8 ++++---- .../cvs-plugin/src/com/intellij/cvsSupport2/CvsUtil.java | 2 +- .../devkit/devkit-core/src/dom/generator/FileManager.java | 4 ++-- .../gradle/service/project/ProjectResolverContext.java | 2 +- .../groovy/lang/psi/api/types/GrTypeParameter.java | 2 +- .../lang/psi/impl/synthetic/GrDynamicImplicitElement.java | 8 ++++---- .../xsltDebugger/rt/engine/remote/RemoteDebugger.java | 2 +- .../python/debugger/pydev/PyVariableLocator.java | 4 ++-- .../com/jetbrains/python/run/RunnableScriptFilter.java | 2 +- .../pytestLegacy/PyTestRunConfigurationParams.java | 8 ++++---- .../tests/com/intellij/util/xml/DomExtensionsTest.java | 2 +- .../tests/com/intellij/util/xml/DomSimpleValuesTest.java | 3 +-- .../plugins/relaxNG/compact/psi/impl/FollowFileHint.java | 2 +- .../org/intellij/plugins/relaxNG/model/CommonElement.java | 2 +- 22 files changed, 37 insertions(+), 38 deletions(-) diff --git a/java/compiler/tests/com/intellij/compiler/IOUtilTest.java b/java/compiler/tests/com/intellij/compiler/IOUtilTest.java index 713aac1f5da1..f17be223b042 100644 --- a/java/compiler/tests/com/intellij/compiler/IOUtilTest.java +++ b/java/compiler/tests/com/intellij/compiler/IOUtilTest.java @@ -14,7 +14,7 @@ import java.io.*; */ public class IOUtilTest extends TestCase { - private static interface IO { + private interface IO { void save(String str, DataOutput out) throws IOException; String load(DataInput in) throws IOException; } diff --git a/platform/lang-api/src/com/intellij/ide/PsiActionSupportFactory.java b/platform/lang-api/src/com/intellij/ide/PsiActionSupportFactory.java index 65bb3b88b0ec..de8e3007f8ce 100644 --- a/platform/lang-api/src/com/intellij/ide/PsiActionSupportFactory.java +++ b/platform/lang-api/src/com/intellij/ide/PsiActionSupportFactory.java @@ -31,7 +31,7 @@ public abstract class PsiActionSupportFactory { return ServiceManager.getService(PsiActionSupportFactory.class); } - public static interface PsiElementSelector { + public interface PsiElementSelector { @NotNull PsiElement[] getSelectedElements(); } diff --git a/platform/platform-api/src/com/intellij/openapi/wm/AppIconScheme.java b/platform/platform-api/src/com/intellij/openapi/wm/AppIconScheme.java index 2ee5e36fa467..52345dc1df53 100644 --- a/platform/platform-api/src/com/intellij/openapi/wm/AppIconScheme.java +++ b/platform/platform-api/src/com/intellij/openapi/wm/AppIconScheme.java @@ -26,7 +26,7 @@ public class AppIconScheme { public interface Progress { - static final Progress TESTS = new Progress() { + Progress TESTS = new Progress() { @Override public Color getOkColor() { return TESTS_OK_COLOR; @@ -38,7 +38,7 @@ public class AppIconScheme { } }; - static final Progress BUILD = new Progress() { + Progress BUILD = new Progress() { @Override public Color getOkColor() { return BUILD_OK_COLOR; @@ -50,7 +50,7 @@ public class AppIconScheme { } }; - static final Progress INDEXING = new Progress() { + Progress INDEXING = new Progress() { @Override public Color getOkColor() { return INDEXING_OK_COLOR; diff --git a/platform/platform-api/src/com/intellij/ui/ListUtil.java b/platform/platform-api/src/com/intellij/ui/ListUtil.java index de942516d0fd..5492a49eb323 100644 --- a/platform/platform-api/src/com/intellij/ui/ListUtil.java +++ b/platform/platform-api/src/com/intellij/ui/ListUtil.java @@ -335,7 +335,7 @@ public class ListUtil { return listener; } - public static interface RemoveNotification { + public interface RemoveNotification { void itemsRemoved(List items); } @@ -350,7 +350,7 @@ public class ListUtil { return null; } - private static interface ListModelExtension { + private interface ListModelExtension { Object get(ModelType model, int index); void remove(ModelType model, int index); } diff --git a/platform/platform-api/src/com/intellij/ui/ReorderableListController.java b/platform/platform-api/src/com/intellij/ui/ReorderableListController.java index 5f6689939c8b..f610e8a053e6 100644 --- a/platform/platform-api/src/com/intellij/ui/ReorderableListController.java +++ b/platform/platform-api/src/com/intellij/ui/ReorderableListController.java @@ -196,7 +196,7 @@ public abstract class ReorderableListController { } } - static interface ActionBehaviour { + interface ActionBehaviour { T performAction(@NotNull AnActionEvent e); void updateAction(@NotNull AnActionEvent e); } diff --git a/platform/remote-servers/agent-rt/src/com/intellij/remoteServer/agent/util/log/TerminalListener.java b/platform/remote-servers/agent-rt/src/com/intellij/remoteServer/agent/util/log/TerminalListener.java index bd1590b00cb8..30f3be67e29b 100644 --- a/platform/remote-servers/agent-rt/src/com/intellij/remoteServer/agent/util/log/TerminalListener.java +++ b/platform/remote-servers/agent-rt/src/com/intellij/remoteServer/agent/util/log/TerminalListener.java @@ -19,7 +19,7 @@ public interface TerminalListener { void close(); - static TerminalListener NULL = new TerminalListener() { + TerminalListener NULL = new TerminalListener() { public void close() { diff --git a/platform/util/src/com/intellij/util/containers/ConcurrentLongObjectMap.java b/platform/util/src/com/intellij/util/containers/ConcurrentLongObjectMap.java index db992680c023..a848c7284bcb 100644 --- a/platform/util/src/com/intellij/util/containers/ConcurrentLongObjectMap.java +++ b/platform/util/src/com/intellij/util/containers/ConcurrentLongObjectMap.java @@ -82,7 +82,7 @@ public interface ConcurrentLongObjectMap { boolean isEmpty(); @NotNull - public Enumeration elements(); + Enumeration elements(); @NotNull Collection values(); boolean containsValue(@NotNull V value); diff --git a/plugins/cvs/cvs-core/src/com/intellij/cvsSupport2/connections/ssh/SmPublicKeyAuthentification.java b/plugins/cvs/cvs-core/src/com/intellij/cvsSupport2/connections/ssh/SmPublicKeyAuthentification.java index d232ef29b4a1..405f743ea79e 100644 --- a/plugins/cvs/cvs-core/src/com/intellij/cvsSupport2/connections/ssh/SmPublicKeyAuthentification.java +++ b/plugins/cvs/cvs-core/src/com/intellij/cvsSupport2/connections/ssh/SmPublicKeyAuthentification.java @@ -19,6 +19,6 @@ package com.intellij.cvsSupport2.connections.ssh; * author: lesya */ public interface SmPublicKeyAuthentification { - public Throwable PRIVATE_KEY_FILE = new Throwable(); - public Throwable PASSPHRASE = new Throwable(); + Throwable PRIVATE_KEY_FILE = new Throwable(); + Throwable PASSPHRASE = new Throwable(); } diff --git a/plugins/cvs/cvs-core/src/com/intellij/openapi/cvsIntegration/DateOrRevision.java b/plugins/cvs/cvs-core/src/com/intellij/openapi/cvsIntegration/DateOrRevision.java index 798261a74cbb..5b32a58f806d 100644 --- a/plugins/cvs/cvs-core/src/com/intellij/openapi/cvsIntegration/DateOrRevision.java +++ b/plugins/cvs/cvs-core/src/com/intellij/openapi/cvsIntegration/DateOrRevision.java @@ -17,8 +17,8 @@ package com.intellij.openapi.cvsIntegration; public interface DateOrRevision { - public String getBranch(); - public boolean shouldUseBranch(); - public String getDate(); - public boolean shouldUseDate(); + String getBranch(); + boolean shouldUseBranch(); + String getDate(); + boolean shouldUseDate(); } diff --git a/plugins/cvs/cvs-plugin/src/com/intellij/cvsSupport2/CvsUtil.java b/plugins/cvs/cvs-plugin/src/com/intellij/cvsSupport2/CvsUtil.java index 0e24b73a4b78..640748ddeaa1 100644 --- a/plugins/cvs/cvs-plugin/src/com/intellij/cvsSupport2/CvsUtil.java +++ b/plugins/cvs/cvs-plugin/src/com/intellij/cvsSupport2/CvsUtil.java @@ -727,7 +727,7 @@ public class CvsUtil { return dirTag.startsWith(STICKY_BRANCH_TAG_PREFIX) || dirTag.startsWith(STICKY_NON_BRANCH_TAG_PREFIX); } - private static interface FileCondition { + private interface FileCondition { boolean verify(File file); } diff --git a/plugins/devkit/devkit-core/src/dom/generator/FileManager.java b/plugins/devkit/devkit-core/src/dom/generator/FileManager.java index 8ad5c711a6c4..b82843d7f769 100644 --- a/plugins/devkit/devkit-core/src/dom/generator/FileManager.java +++ b/plugins/devkit/devkit-core/src/dom/generator/FileManager.java @@ -28,6 +28,6 @@ import java.io.File; * @author Konstantin Bulenkov */ public interface FileManager { - public File releaseOutputFile(File outFile); - public File getOutputFile(File target); + File releaseOutputFile(File outFile); + File getOutputFile(File target); } diff --git a/plugins/gradle/src/org/jetbrains/plugins/gradle/service/project/ProjectResolverContext.java b/plugins/gradle/src/org/jetbrains/plugins/gradle/service/project/ProjectResolverContext.java index 8c481629a857..1f16b05fc47e 100644 --- a/plugins/gradle/src/org/jetbrains/plugins/gradle/service/project/ProjectResolverContext.java +++ b/plugins/gradle/src/org/jetbrains/plugins/gradle/service/project/ProjectResolverContext.java @@ -63,7 +63,7 @@ public interface ProjectResolverContext extends UserDataHolderEx { @NotNull ProjectImportAction.AllModels getModels(); - public void setModels(@NotNull ProjectImportAction.AllModels models) ; + void setModels(@NotNull ProjectImportAction.AllModels models) ; @Nullable T getExtraProject(Class modelClazz); diff --git a/plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/lang/psi/api/types/GrTypeParameter.java b/plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/lang/psi/api/types/GrTypeParameter.java index 13d820e3f66e..dd4fd39f505f 100644 --- a/plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/lang/psi/api/types/GrTypeParameter.java +++ b/plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/lang/psi/api/types/GrTypeParameter.java @@ -24,6 +24,6 @@ import org.jetbrains.plugins.groovy.lang.psi.api.statements.typedef.GrTypeDefini * @author ilyas */ public interface GrTypeParameter extends GrTypeDefinition, PsiTypeParameter { - public static final GrTypeParameter[] EMPTY_ARRAY = new GrTypeParameter[0]; + GrTypeParameter[] EMPTY_ARRAY = new GrTypeParameter[0]; ArrayFactory ARRAY_FACTORY = count -> count == 0 ? EMPTY_ARRAY : new GrTypeParameter[count]; } diff --git a/plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/lang/psi/impl/synthetic/GrDynamicImplicitElement.java b/plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/lang/psi/impl/synthetic/GrDynamicImplicitElement.java index 4cc754136aa4..134004b5e542 100644 --- a/plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/lang/psi/impl/synthetic/GrDynamicImplicitElement.java +++ b/plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/lang/psi/impl/synthetic/GrDynamicImplicitElement.java @@ -29,12 +29,12 @@ import org.jetbrains.annotations.Nullable; */ public interface GrDynamicImplicitElement extends ItemPresentation, NavigationItem { @Nullable - public PsiClass getContainingClassElement(); + PsiClass getContainingClassElement(); @NotNull - public SearchScope getUseScope(); + SearchScope getUseScope(); - public PsiFile getContainingFile(); + PsiFile getContainingFile(); - public String getContainingClassName(); + String getContainingClassName(); } diff --git a/plugins/xslt-debugger/engine/src/org/intellij/plugins/xsltDebugger/rt/engine/remote/RemoteDebugger.java b/plugins/xslt-debugger/engine/src/org/intellij/plugins/xsltDebugger/rt/engine/remote/RemoteDebugger.java index 510d24e5cbdf..255742575a01 100644 --- a/plugins/xslt-debugger/engine/src/org/intellij/plugins/xsltDebugger/rt/engine/remote/RemoteDebugger.java +++ b/plugins/xslt-debugger/engine/src/org/intellij/plugins/xsltDebugger/rt/engine/remote/RemoteDebugger.java @@ -83,7 +83,7 @@ public interface RemoteDebugger extends Remote { String getInstruction() throws RemoteException; } - public interface Variable extends Remote { + interface Variable extends Remote { boolean isGlobal() throws RemoteException; Debugger.Variable.Kind getKind() throws RemoteException; diff --git a/python/pydevSrc/com/jetbrains/python/debugger/pydev/PyVariableLocator.java b/python/pydevSrc/com/jetbrains/python/debugger/pydev/PyVariableLocator.java index 3ba4e1cd96de..293f71dc5363 100644 --- a/python/pydevSrc/com/jetbrains/python/debugger/pydev/PyVariableLocator.java +++ b/python/pydevSrc/com/jetbrains/python/debugger/pydev/PyVariableLocator.java @@ -10,8 +10,8 @@ package com.jetbrains.python.debugger.pydev; */ public interface PyVariableLocator { - public String getThreadId(); + String getThreadId(); - public String getPyDBLocation(); + String getPyDBLocation(); } diff --git a/python/src/com/jetbrains/python/run/RunnableScriptFilter.java b/python/src/com/jetbrains/python/run/RunnableScriptFilter.java index 6f81eba3158e..0f48516ed083 100644 --- a/python/src/com/jetbrains/python/run/RunnableScriptFilter.java +++ b/python/src/com/jetbrains/python/run/RunnableScriptFilter.java @@ -38,7 +38,7 @@ public interface RunnableScriptFilter { boolean isRunnableScript(PsiFile script, @NotNull Module module, Location location, @Nullable TypeEvalContext context); - public static boolean isIfNameMain(Location location) { + static boolean isIfNameMain(Location location) { PsiElement element = location.getPsiElement(); while (true) { final PyIfStatement ifStatement = PsiTreeUtil.getParentOfType(element, PyIfStatement.class); diff --git a/python/src/com/jetbrains/python/testing/pytestLegacy/PyTestRunConfigurationParams.java b/python/src/com/jetbrains/python/testing/pytestLegacy/PyTestRunConfigurationParams.java index 6f40141b0cb9..ce9864308263 100644 --- a/python/src/com/jetbrains/python/testing/pytestLegacy/PyTestRunConfigurationParams.java +++ b/python/src/com/jetbrains/python/testing/pytestLegacy/PyTestRunConfigurationParams.java @@ -19,8 +19,8 @@ package com.jetbrains.python.testing.pytestLegacy; * User : catherine */ public interface PyTestRunConfigurationParams { - public boolean useParam(); - public void useParam(boolean useParam); - public boolean useKeyword(); - public void useKeyword(boolean useKeyword); + boolean useParam(); + void useParam(boolean useParam); + boolean useKeyword(); + void useKeyword(boolean useKeyword); } diff --git a/xml/dom-tests/tests/com/intellij/util/xml/DomExtensionsTest.java b/xml/dom-tests/tests/com/intellij/util/xml/DomExtensionsTest.java index e68e16b0278f..b8a577b06820 100644 --- a/xml/dom-tests/tests/com/intellij/util/xml/DomExtensionsTest.java +++ b/xml/dom-tests/tests/com/intellij/util/xml/DomExtensionsTest.java @@ -295,6 +295,6 @@ public class DomExtensionsTest extends DomTestCase { public MyStringBufferConverter(boolean b) { } } - public static interface MyAttribute extends GenericAttributeValue {} + public interface MyAttribute extends GenericAttributeValue {} } diff --git a/xml/dom-tests/tests/com/intellij/util/xml/DomSimpleValuesTest.java b/xml/dom-tests/tests/com/intellij/util/xml/DomSimpleValuesTest.java index 79ae28680b23..4c4650648e3f 100644 --- a/xml/dom-tests/tests/com/intellij/util/xml/DomSimpleValuesTest.java +++ b/xml/dom-tests/tests/com/intellij/util/xml/DomSimpleValuesTest.java @@ -15,7 +15,6 @@ */ package com.intellij.util.xml; -import com.intellij.openapi.application.Result; import com.intellij.openapi.command.WriteCommandAction; import com.intellij.psi.*; import com.intellij.psi.search.GlobalSearchScope; @@ -532,7 +531,7 @@ public class DomSimpleValuesTest extends DomTestCase { public interface CmpField extends JavaeeDomModelElement { @NameValue - public GenericDomValue getName(); + GenericDomValue getName(); } public static class MyConverter extends Converter { diff --git a/xml/relaxng/src/org/intellij/plugins/relaxNG/compact/psi/impl/FollowFileHint.java b/xml/relaxng/src/org/intellij/plugins/relaxNG/compact/psi/impl/FollowFileHint.java index 3ea00daf9f69..e0cafccf71ad 100644 --- a/xml/relaxng/src/org/intellij/plugins/relaxNG/compact/psi/impl/FollowFileHint.java +++ b/xml/relaxng/src/org/intellij/plugins/relaxNG/compact/psi/impl/FollowFileHint.java @@ -22,5 +22,5 @@ import org.intellij.plugins.relaxNG.compact.psi.RncFile; public interface FollowFileHint { Key KEY = Key.create("FollowFileHint"); - public boolean doFollow(RncFile file); + boolean doFollow(RncFile file); } diff --git a/xml/relaxng/src/org/intellij/plugins/relaxNG/model/CommonElement.java b/xml/relaxng/src/org/intellij/plugins/relaxNG/model/CommonElement.java index 095b66165396..6ae76e41b2fe 100644 --- a/xml/relaxng/src/org/intellij/plugins/relaxNG/model/CommonElement.java +++ b/xml/relaxng/src/org/intellij/plugins/relaxNG/model/CommonElement.java @@ -27,7 +27,7 @@ public interface CommonElement { @Nullable E getPsiElement(); - static abstract class Visitor { + abstract class Visitor { public void visitElement(CommonElement pattern) { }