Javadoc for Timeout class should use Timeout.millis(long) instead of deprecated Timeout(int) constructor
SonarQube had problems scanning this file because it believed it got multiple blame annotations for the same line. This seemed to be the only file with CR line endings, so I changed it to LF which is consistent with the files in the same directory. Closes #1086
The introduction of the runLeaf() method in BlockJUnit4ClassRunner in JUnit 4.9 introduced a regression with regard to exception handling. Specifically, the invocation of methodBlock() is no longer executed within a try-catch block as was the case in previous versions of JUnit. Custom modifications to methodBlock() or the methods it invokes may in fact throw exceptions. In such cases, exceptions thrown from methodBlock() cause the current test execution to abort immediately. As a result, the failing test method is unrooted in test reports, and subsequent test methods are never invoked. Furthermore, RunListeners registered with JUnit are not notified. This commit addresses this issue by wrapping the invocation of methodBlock() within a try-catch block. If an exception is not thrown, the resulting Statement is passed to runLeaf(). If an exception is thrown, it is wrapped in a Fail statement which is passed to runLeaf(). Closes #1066 Closes #1082
The method classes(Computer computer, Class<?>... classes) in org.junit.runner.Request swallows an InitializationError and throws a new RuntimeException instead when it cannot create a request. This prevents the user from finding out why the request could not be created. This change replaces throwing a new RuntimeException with generating a proper error report. The report contains the causes of the InitializationError so the user has a chance to find out what is causing the problem.
…l its true purpose. Closes #1071
…ryFolder rule. Closes #1044
…arrays have different lengths. Previously, JUnit's assertion error message would indicate only that some array lengths x and y were unequal, without indicating whether this pertained to the outer array or some nested array. Now, in case of a length mismatch between two nested arrays, Junit will tell at which indices they reside. Closes #1054 Closes #803