This commit is contained in:
Alexey Kudravtsev
2014-04-10 12:32:55 +04:00
parent e6896ab9bf
commit 3fe97540a5
5 changed files with 10 additions and 6 deletions
@@ -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.
@@ -25,6 +25,7 @@ import com.intellij.psi.impl.JavaConstantExpressionEvaluator;
import com.intellij.psi.search.GlobalSearchScope;
import com.intellij.testFramework.PsiTestCase;
import com.intellij.testFramework.PsiTestUtil;
import org.jetbrains.annotations.NotNull;
import java.io.IOException;
@@ -57,7 +58,7 @@ public class ConstantValuesTest extends PsiTestCase{
}
@Override
protected void invokeTestRunnable(Runnable runnable) throws Exception {
protected void invokeTestRunnable(@NotNull Runnable runnable) throws Exception {
super.invokeTestRunnable(runnable);
final PsiJavaFile file = (PsiJavaFile)myClass.getContainingFile();
@@ -33,6 +33,7 @@ import com.intellij.pom.java.LanguageLevel;
import com.intellij.psi.search.GlobalSearchScope;
import com.intellij.testFramework.*;
import com.intellij.util.IncorrectOperationException;
import org.jetbrains.annotations.NotNull;
import java.util.Random;
import java.util.concurrent.CountDownLatch;
@@ -193,7 +194,7 @@ public class PsiConcurrencyStressTest extends PsiTestCase {
}
@Override
protected void invokeTestRunnable(final Runnable runnable) throws Exception {
protected void invokeTestRunnable(@NotNull final Runnable runnable) throws Exception {
runnable.run();
}
}
@@ -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.
@@ -63,6 +63,7 @@ public class RunResult<T> extends Result<T> {
return myResult;
}
@NotNull
public RunResult logException(Logger logger) {
if (hasException()) {
logger.error(myThrowable);
@@ -71,6 +72,7 @@ public class RunResult<T> extends Result<T> {
return this;
}
@NotNull
public RunResult<T> throwException() throws RuntimeException, Error {
if (hasException()) {
if (myThrowable instanceof RuntimeException) {
@@ -694,7 +694,7 @@ public abstract class PlatformTestCase extends UsefulTestCase implements DataPro
}
@Override
protected void invokeTestRunnable(final Runnable runnable) throws Exception {
protected void invokeTestRunnable(@NotNull final Runnable runnable) throws Exception {
final Exception[] e = new Exception[1];
Runnable runnable1 = new Runnable() {
@Override
@@ -328,7 +328,7 @@ public abstract class UsefulTestCase extends TestCase {
UIUtil.invokeAndWaitIfNeeded(r);
}
protected void invokeTestRunnable(Runnable runnable) throws Exception {
protected void invokeTestRunnable(@NotNull Runnable runnable) throws Exception {
UIUtil.invokeAndWaitIfNeeded(runnable);
//runnable.run();
}