diff --git a/docs/manual/OptionalTasks/junit.html b/docs/manual/OptionalTasks/junit.html
index 4c4d43c42..d2ec6fd13 100644
--- a/docs/manual/OptionalTasks/junit.html
+++ b/docs/manual/OptionalTasks/junit.html
@@ -9,8 +9,8 @@
This task runs tests from the JUnit testing framework. The latest
version of the framework can be found at
http://www.junit.org.
-This task has been tested with JUnit 3.0 up to JUnit 3.6, it won't
-work with versions before JUnit 3.0.
+This task has been tested with JUnit 3.0 up to JUnit 3.7, it won't
+work with versions prior to JUnit 3.0.
Tests are defined by nested test
or
batchtest
tags, see nested
diff --git a/src/testcases/org/apache/tools/ant/IntrospectionHelperTest.java b/src/testcases/org/apache/tools/ant/IntrospectionHelperTest.java
index 9c945629d..8e76bd8ad 100644
--- a/src/testcases/org/apache/tools/ant/IntrospectionHelperTest.java
+++ b/src/testcases/org/apache/tools/ant/IntrospectionHelperTest.java
@@ -368,6 +368,16 @@ public class IntrospectionHelperTest extends TestCase {
h.put("fourteen", java.lang.StringBuffer.class);
h.put("fifteen", java.lang.Character.TYPE);
h.put("sixteen", java.lang.Character.class);
+
+ /*
+ * JUnit 3.7 adds a getName method to TestCase - so we now
+ * have a name attribute in IntrospectionHelperTest if we run
+ * under JUnit 3.7 but not in earlier versions.
+ *
+ * Simply add it here and remove it after the tests.
+ */
+ h.put("name", java.lang.String.class);
+
IntrospectionHelper ih = IntrospectionHelper.getHelper(getClass());
Enumeration enum = ih.getAttributes();
while (enum.hasMoreElements()) {
@@ -378,6 +388,7 @@ public class IntrospectionHelperTest extends TestCase {
assertEquals("Type of "+name, expect, ih.getAttributeType(name));
h.remove(name);
}
+ h.remove("name");
assert("Found all", h.isEmpty());
}