From ca31a6dc82ee0fa71e9e190beed1bcf7f01e675d Mon Sep 17 00:00:00 2001 From: Roman Shevchenko Date: Thu, 2 Sep 2010 11:33:43 +0400 Subject: [PATCH] Cleanup --- platform/testFramework/src/com/intellij/TestAll.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/platform/testFramework/src/com/intellij/TestAll.java b/platform/testFramework/src/com/intellij/TestAll.java index 8dd5d61bf825..591df035bae6 100644 --- a/platform/testFramework/src/com/intellij/TestAll.java +++ b/platform/testFramework/src/com/intellij/TestAll.java @@ -46,7 +46,7 @@ import java.net.URLClassLoader; import java.util.Arrays; import java.util.List; -@SuppressWarnings({"HardCodedStringLiteral"}) +@SuppressWarnings({"HardCodedStringLiteral", "CallToPrintStackTrace", "UseOfSystemOutOrSystemErr"}) public class TestAll implements Test { static { @@ -112,6 +112,7 @@ public class TestAll implements Test { if (currentThread != null) { currentThread.interrupt(); if (!currentThread.isInterrupted()) { + //noinspection deprecation currentThread.stop(new RuntimeException("Current Test Interrupted: OUT OF TIME!")); } @@ -142,7 +143,7 @@ public class TestAll implements Test { } private void addErrorMessage(TestResult testResult, String message) { - String processedTestsMessage = myRunTests <= 0 ? "Noone test was run" : myRunTests + " tests processed"; + String processedTestsMessage = myRunTests <= 0 ? "None of tests was run" : myRunTests + " tests processed"; try { testResult.startTest(this); testResult.addError(this, new Throwable(processedTestsMessage + " before: " + message)); @@ -287,8 +288,7 @@ public class TestAll implements Test { long realFreeMemory = runtime.freeMemory() + (maxMemory - runtime.totalMemory()); long meg = 1024 * 1024; long needed = neededMemory * meg; - boolean possibleOutOfMemoryError = realFreeMemory < needed; - return possibleOutOfMemoryError; + return realFreeMemory < needed; } private static Test getTest(Class testCaseClass) {