From 1ffb8a4f124f335f040061c82e19340d63812101 Mon Sep 17 00:00:00 2001 From: Alexey Kudravtsev Date: Tue, 28 Dec 2010 20:34:48 +0300 Subject: [PATCH] cleanup --- .../testSrc/com/intellij/psi/ClsBuilderTest.java | 7 ------- .../intellij/execution/ui/RunContentManagerImpl.java | 4 ++-- .../openapi/vfs/impl/local/LocalFileSystemBase.java | 6 ------ .../src/com/intellij/testFramework/UsefulTestCase.java | 10 +++++----- .../cvsSupport2/cvsExecution/CvsOperationExecutor.java | 6 +++--- 5 files changed, 10 insertions(+), 23 deletions(-) diff --git a/java/java-tests/testSrc/com/intellij/psi/ClsBuilderTest.java b/java/java-tests/testSrc/com/intellij/psi/ClsBuilderTest.java index 873ef3abc141..eae004f73a6d 100644 --- a/java/java-tests/testSrc/com/intellij/psi/ClsBuilderTest.java +++ b/java/java-tests/testSrc/com/intellij/psi/ClsBuilderTest.java @@ -4,8 +4,6 @@ package com.intellij.psi; import com.intellij.JavaTestUtil; -import com.intellij.openapi.projectRoots.Sdk; -import com.intellij.openapi.projectRoots.impl.JavaSdkImpl; import com.intellij.openapi.roots.OrderRootType; import com.intellij.openapi.util.io.FileUtil; import com.intellij.openapi.util.text.StringUtil; @@ -23,11 +21,6 @@ import java.io.FileWriter; import java.io.IOException; public class ClsBuilderTest extends LightIdeaTestCase { - @Override - protected Sdk getProjectJDK() { - return JavaSdkImpl.getMockJdk17(); - } - public void testUtilList() throws Exception { doTest("java/util/List.class"); } diff --git a/platform/lang-impl/src/com/intellij/execution/ui/RunContentManagerImpl.java b/platform/lang-impl/src/com/intellij/execution/ui/RunContentManagerImpl.java index 7b7f2513907a..1cf2f1aeea0f 100644 --- a/platform/lang-impl/src/com/intellij/execution/ui/RunContentManagerImpl.java +++ b/platform/lang-impl/src/com/intellij/execution/ui/RunContentManagerImpl.java @@ -118,7 +118,7 @@ public class RunContentManagerImpl implements RunContentManager, Disposable { myToolwindowIdZbuffer.remove(id); } - private void registerToolwindow(final @NotNull Executor executor) { + private void registerToolwindow(@NotNull final Executor executor) { final String toolWindowId = executor.getToolWindowId(); final ToolWindowManager toolWindowManager = ToolWindowManager.getInstance(myProject); if (toolWindowManager == null) return; //headless environment @@ -490,7 +490,7 @@ public class RunContentManagerImpl implements RunContentManager, Disposable { private Content myContent; private final Executor myExecutor; - private CloseListener(final @NotNull Content content, @NotNull Executor executor) { + private CloseListener(@NotNull final Content content, @NotNull Executor executor) { myContent = content; content.getManager().addContentManagerListener(this); ProjectManager.getInstance().addProjectManagerListener(this); diff --git a/platform/platform-impl/src/com/intellij/openapi/vfs/impl/local/LocalFileSystemBase.java b/platform/platform-impl/src/com/intellij/openapi/vfs/impl/local/LocalFileSystemBase.java index 535555f728f1..000b276a218b 100644 --- a/platform/platform-impl/src/com/intellij/openapi/vfs/impl/local/LocalFileSystemBase.java +++ b/platform/platform-impl/src/com/intellij/openapi/vfs/impl/local/LocalFileSystemBase.java @@ -48,12 +48,6 @@ public abstract class LocalFileSystemBase extends LocalFileSystem { @Nullable public VirtualFile findFileByPath(@NotNull String path) { - /* - if (File.separatorChar == '\\') { - if (path.indexOf('\\') >= 0) return null; - } - */ - String canonicalPath = getVfsCanonicalPath(path); if (canonicalPath == null) return null; return super.findFileByPath(canonicalPath); diff --git a/platform/testFramework/src/com/intellij/testFramework/UsefulTestCase.java b/platform/testFramework/src/com/intellij/testFramework/UsefulTestCase.java index cc940ba9a9aa..025e2b1cd464 100644 --- a/platform/testFramework/src/com/intellij/testFramework/UsefulTestCase.java +++ b/platform/testFramework/src/com/intellij/testFramework/UsefulTestCase.java @@ -262,7 +262,7 @@ public abstract class UsefulTestCase extends TestCase { final StringBuilder builder = new StringBuilder(); for (final Object o : collection) { if (o instanceof THashSet) { - builder.append(new TreeSet((Collection)o)); + builder.append(new TreeSet((THashSet)o)); } else { builder.append(o); @@ -423,7 +423,7 @@ public abstract class UsefulTestCase extends TestCase { } public static void printThreadDump() { - PerformanceWatcher.getInstance().dumpThreadsToConsole(); + PerformanceWatcher.dumpThreadsToConsole(); } public static void assertEmpty(final Object[] array) { @@ -642,9 +642,9 @@ public abstract class UsefulTestCase extends TestCase { assertNull(throwableName); } - private void assertExceptionOccurred(boolean shouldOccur, - AbstractExceptionCase exceptionCase, - String expectedErrorMsg) throws Throwable { + private static void assertExceptionOccurred(boolean shouldOccur, + AbstractExceptionCase exceptionCase, + String expectedErrorMsg) throws Throwable { boolean wasThrown = false; try { exceptionCase.tryClosure(); diff --git a/plugins/cvs/cvs-plugin/src/com/intellij/cvsSupport2/cvsExecution/CvsOperationExecutor.java b/plugins/cvs/cvs-plugin/src/com/intellij/cvsSupport2/cvsExecution/CvsOperationExecutor.java index e87da4419767..b38c00503f63 100644 --- a/plugins/cvs/cvs-plugin/src/com/intellij/cvsSupport2/cvsExecution/CvsOperationExecutor.java +++ b/plugins/cvs/cvs-plugin/src/com/intellij/cvsSupport2/cvsExecution/CvsOperationExecutor.java @@ -102,7 +102,7 @@ public class CvsOperationExecutor { myResult.addAllErrors(handler.getErrorsExceptAborted()); myResult.addAllWarnings(handler.getWarnings()); handler.runComplitingActivities(); - if ((myProject == null) || (myProject != null && !myProject.isDisposed())) { + if (myProject == null || myProject != null && !myProject.isDisposed()) { showErrors(handler.getErrorsExceptAborted(), handler.getWarnings(), tabbedWindow); } } @@ -118,7 +118,7 @@ public class CvsOperationExecutor { } finally { - if ((myProject != null) && (handler != CvsHandler.NULL)) { + if (myProject != null && handler != CvsHandler.NULL) { StatusBar.Info.set(getStatusMessage(handler), myProject); } } @@ -194,7 +194,7 @@ public class CvsOperationExecutor { } private static boolean isInProgress() { - return (ProgressManager.getInstance().getProgressIndicator() != null); + return ProgressManager.getInstance().getProgressIndicator() != null; } protected void showErrors(final List errors, CvsTabbedWindow tabbedWindow) {