Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #504 from amalakar/master

[Issue #394] Added javadoc mentioning special case when subclass overrides/shadows superclass methods
  • Loading branch information...
commit d48bf9735b916e7f2c06575970f90dff6f512822 2 parents b9e14f6 + ec9bccf
@dsaff dsaff authored
View
4 src/main/java/org/junit/After.java
@@ -11,8 +11,8 @@
* with <code>&#064;After</code> causes that method to be run after the {@link org.junit.Test} method. All <code>&#064;After</code>
* methods are guaranteed to run even if a {@link org.junit.Before} or {@link org.junit.Test} method throws an
* exception. The <code>&#064;After</code> methods declared in superclasses will be run after those of the current
- * class.</p>
- *
+ * class, unless they are overridden in the current class.</p>
+ *
* Here is a simple example:
* <pre>
* public class Example {
View
4 src/main/java/org/junit/AfterClass.java
@@ -11,8 +11,8 @@
* with <code>&#064;AfterClass</code> causes that method to be run after all the tests in the class have been run. All <code>&#064;AfterClass</code>
* methods are guaranteed to run even if a {@link org.junit.BeforeClass} method throws an
* exception. The <code>&#064;AfterClass</code> methods declared in superclasses will be run after those of the current
- * class.</p>
- *
+ * class, unless they are shadowed in the current class.</p>
+ *
* Here is a simple example:
* <pre>
* public class Example {
View
4 src/main/java/org/junit/Before.java
@@ -9,8 +9,8 @@
* <p>When writing tests, it is common to find that several tests need similar
* objects created before they can run. Annotating a <code>public void</code> method
* with <code>&#064;Before</code> causes that method to be run before the {@link org.junit.Test} method.
- * The <code>&#064;Before</code> methods of superclasses will be run before those of the current class.
- * No other ordering is defined.
+ * The <code>&#064;Before</code> methods of superclasses will be run before those of the current class,
+ * unless they are overridden in the current class. No other ordering is defined.
* </p>
*
* Here is a simple example:
View
4 src/main/java/org/junit/BeforeClass.java
@@ -11,8 +11,8 @@
* tests, sometimes it is a necessary optimization. Annotating a <code>public static void</code> no-arg method
* with <code>@BeforeClass</code> causes it to be run once before any of
* the test methods in the class. The <code>@BeforeClass</code> methods of superclasses
- * will be run before those the current class.</p>
- *
+ * will be run before those the current class, unless they are shadowed in the current class.</p>
+ *
* For example:
* <pre>
* public class Example {
Please sign in to comment.
Something went wrong with that request. Please try again.