git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@565091 13f79535-47bb-0310-9956-ffa450edef68master
@@ -202,7 +202,7 @@ public class FailureRecorder implements JUnitResultFormatter { | |||||
private void createClassHeader() { | private void createClassHeader() { | ||||
String className = getLocationName().replace('\\', '/'); | String className = getLocationName().replace('\\', '/'); | ||||
if (className.indexOf('/') > -1) { | if (className.indexOf('/') > -1) { | ||||
className = className.substring(className.lastIndexOf('/') +1 ); | |||||
className = className.substring(className.lastIndexOf('/') + 1); | |||||
} | } | ||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy.MM.dd HH:mm:ss,SSS"); | SimpleDateFormat sdf = new SimpleDateFormat("yyyy.MM.dd HH:mm:ss,SSS"); | ||||
writer.print("// generated on: "); | writer.print("// generated on: "); | ||||
@@ -27,6 +27,7 @@ import junit.framework.TestCase; | |||||
* different JUnit releases. | * different JUnit releases. | ||||
* @since Ant 1.7 | * @since Ant 1.7 | ||||
*/ | */ | ||||
// CheckStyle:HideUtilityClassConstructorCheck OFF (bc) | |||||
public class JUnitVersionHelper { | public class JUnitVersionHelper { | ||||
private static Method testCaseName = null; | private static Method testCaseName = null; | ||||
@@ -36,7 +37,8 @@ public class JUnitVersionHelper { | |||||
* {@value} | * {@value} | ||||
* @since Ant 1.7.1 | * @since Ant 1.7.1 | ||||
*/ | */ | ||||
public static final String JUNIT_FRAMEWORK_JUNIT4_TEST_CASE_FACADE = "junit.framework.JUnit4TestCaseFacade"; | |||||
public static final String JUNIT_FRAMEWORK_JUNIT4_TEST_CASE_FACADE | |||||
= "junit.framework.JUnit4TestCaseFacade"; | |||||
private static final String UNKNOWN_TEST_CASE_NAME = "unknown"; | private static final String UNKNOWN_TEST_CASE_NAME = "unknown"; | ||||
static { | static { | ||||
@@ -68,8 +70,7 @@ public class JUnitVersionHelper { | |||||
* @return the name of the test. | * @return the name of the test. | ||||
*/ | */ | ||||
public static String getTestCaseName(Test t) { | public static String getTestCaseName(Test t) { | ||||
if (t == null) | |||||
{ | |||||
if (t == null) { | |||||
return UNKNOWN_TEST_CASE_NAME; | return UNKNOWN_TEST_CASE_NAME; | ||||
} | } | ||||
if (t.getClass().getName().equals(JUNIT_FRAMEWORK_JUNIT4_TEST_CASE_FACADE)) { | if (t.getClass().getName().equals(JUNIT_FRAMEWORK_JUNIT4_TEST_CASE_FACADE)) { | ||||
@@ -65,6 +65,7 @@ package org.apache.tools.ant.taskdefs.optional.junit; | |||||
* @see XMLJUnitResultFormatter | * @see XMLJUnitResultFormatter | ||||
* @see XMLResultAggregator | * @see XMLResultAggregator | ||||
*/ | */ | ||||
// CheckStyle:InterfaceIsTypeCheck OFF (bc) | |||||
public interface XMLConstants { | public interface XMLConstants { | ||||
/** the testsuites element for the aggregate document */ | /** the testsuites element for the aggregate document */ | ||||
String TESTSUITES = "testsuites"; | String TESTSUITES = "testsuites"; | ||||