Permalink
Browse files

[Issue #394] [review incorporated] Added javadoc mentioning special c…

…ase when subclass overrides/shadows superclass methods
  • Loading branch information...
1 parent 6adb3ad commit de15ca2183f9955be7644c59d19aa3e4931a02d8 @amalakar amalakar committed Sep 17, 2012
View
5 src/main/java/org/junit/After.java
@@ -11,10 +11,7 @@
* 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>
- *
- * <p>Note: If a subclass overrides a <code>&#064;After</code> method of the superclass, it would render the
- * <code>&#064;After</code> annotation of the superclass useless.</p>
+ * class, unless they are overridden in the current class.</p>
*
* Here is a simple example:
* <pre>
View
5 src/main/java/org/junit/AfterClass.java
@@ -11,10 +11,7 @@
* 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>
- *
- * <p>Note: If a subclass shadows a <code>&#064;AfterClass</code> method of the superclass by using the
- * same name, it would render the <code>&#064;AfterClass</code> annotation of the superclass useless.</p>
+ * class, unless they are shadowed in the current class.</p>
*
* Here is a simple example:
* <pre>
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>
*
* <p>Note: If a subclass overrides a <code>&#064;Before</code> method of the superclass, it would render the
View
5 src/main/java/org/junit/BeforeClass.java
@@ -11,10 +11,7 @@
* 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>
- *
- * <p>Note: If a subclass shadows a <code>&#064;BeforeClass</code> method of the superclass by using the
- * same name, it would render the <code>&#064;BeforeClass</code> annotation of the superclass useless.</p>
+ * will be run before those the current class, unless they are shadowed in the current class.</p>
*
* For example:
* <pre>

0 comments on commit de15ca2

Please sign in to comment.