ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jgl...@apache.org
Subject svn commit: r1453118 - in /ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/junit: BriefJUnitResultFormatter.java PlainJUnitResultFormatter.java TestListenerWrapper.java XMLJUnitResultFormatter.java
Date Wed, 06 Mar 2013 01:29:44 GMT
Author: jglick
Date: Wed Mar  6 01:29:44 2013
New Revision: 1453118

URL: http://svn.apache.org/r1453118
Log:
Restored Java 5 compilability.

Modified:
    ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/junit/BriefJUnitResultFormatter.java
    ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/junit/PlainJUnitResultFormatter.java
    ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/junit/TestListenerWrapper.java
    ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/junit/XMLJUnitResultFormatter.java

Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/junit/BriefJUnitResultFormatter.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/junit/BriefJUnitResultFormatter.java?rev=1453118&r1=1453117&r2=1453118&view=diff
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/junit/BriefJUnitResultFormatter.java
(original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/junit/BriefJUnitResultFormatter.java
Wed Mar  6 01:29:44 2013
@@ -273,13 +273,12 @@ public class BriefJUnitResultFormatter i
     }
 
 
-    @Override
     public void testIgnored(Test test) {
         String message = null;
         if (test instanceof JUnit4TestCaseFacade) {
             JUnit4TestCaseFacade facade = (JUnit4TestCaseFacade) test;
             Ignore annotation = facade.getDescription().getAnnotation(Ignore.class);
-            if (annotation != null && annotation.value() != null && !annotation.value().isEmpty())
{
+            if (annotation != null && annotation.value().length() > 0) {
                 message = annotation.value();
             }
         }
@@ -305,7 +304,6 @@ public class BriefJUnitResultFormatter i
 
     }
 
-    @Override
     public void testAssumptionFailure(Test test, Throwable cause) {
         formatSkip(test, cause.getMessage());
     }

Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/junit/PlainJUnitResultFormatter.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/junit/PlainJUnitResultFormatter.java?rev=1453118&r1=1453117&r2=1453118&view=diff
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/junit/PlainJUnitResultFormatter.java
(original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/junit/PlainJUnitResultFormatter.java
Wed Mar  6 01:29:44 2013
@@ -263,13 +263,12 @@ public class PlainJUnitResultFormatter i
         }
     }
 
-    @Override
     public void testIgnored(Test test) {
         String message = null;
         if (test instanceof JUnit4TestCaseFacade) {
             JUnit4TestCaseFacade facade = (JUnit4TestCaseFacade) test;
             Ignore annotation = facade.getDescription().getAnnotation(Ignore.class);
-            if (annotation != null && annotation.value() != null && !annotation.value().isEmpty())
{
+            if (annotation != null && annotation.value().length() > 0) {
                 message = annotation.value();
             }
         }
@@ -295,7 +294,6 @@ public class PlainJUnitResultFormatter i
 
     }
 
-    @Override
     public void testAssumptionFailure(Test test, Throwable throwable) {
         formatSkip(test, throwable.getMessage());
     }

Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/junit/TestListenerWrapper.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/junit/TestListenerWrapper.java?rev=1453118&r1=1453117&r2=1453118&view=diff
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/junit/TestListenerWrapper.java
(original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/junit/TestListenerWrapper.java
Wed Mar  6 01:29:44 2013
@@ -36,39 +36,32 @@ public class TestListenerWrapper impleme
         wrapped = listener;
     }
 
-    @Override
     public void addError(Test test, Throwable throwable) {
         wrapped.addError(test, throwable);
     }
 
-    @Override
     public void addFailure(Test test, AssertionFailedError assertionFailedError) {
         wrapped.addFailure(test, assertionFailedError);
     }
 
-    @Override
     public void endTest(Test test) {
         wrapped.endTest(test);
     }
 
-    @Override
     public void startTest(Test test) {
         wrapped.startTest(test);
     }
 
-    @Override
     public void testIgnored(Test test) {
         if (wrapped instanceof IgnoredTestListener) {
             ((IgnoredTestListener)wrapped).testIgnored(test);
         }
     }
 
-    @Override
     public void testAssumptionFailure(Test test, Throwable throwable) {
         if (wrapped instanceof IgnoredTestListener) {
             ((IgnoredTestListener)wrapped).testAssumptionFailure(test, throwable);
         }
     }
 
-
 }

Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/junit/XMLJUnitResultFormatter.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/junit/XMLJUnitResultFormatter.java?rev=1453118&r1=1453117&r2=1453118&view=diff
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/junit/XMLJUnitResultFormatter.java
(original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/junit/XMLJUnitResultFormatter.java
Wed Mar  6 01:29:44 2013
@@ -322,7 +322,6 @@ public class XMLJUnitResultFormatter imp
         nested.appendChild(doc.createCDATASection(output));
     }
 
-    @Override
     public void testIgnored(Test test) {
         String message = null;
         if (test != null && test instanceof JUnit4TestCaseFacade) {
@@ -336,7 +335,7 @@ public class XMLJUnitResultFormatter imp
         	
                 Method testMethod = testClass.getMethod(JUnitVersionHelper.getTestCaseName(test));
                 Ignore annotation = testMethod.getAnnotation(Ignore.class);
-                if (annotation != null && annotation.value() != null && !annotation.value().isEmpty())
{
+                if (annotation != null && annotation.value().length() > 0) {
                     message = annotation.value();
                 }
         	} catch (NoSuchMethodException e) {
@@ -374,7 +373,6 @@ public class XMLJUnitResultFormatter imp
 
     }
 
-    @Override
     public void testAssumptionFailure(Test test, Throwable failure) {
         String message = failure.getMessage();
         formatSkip(test, message);



Mime
View raw message