-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ignore bridge methods when scanning for annotated methods.
- Loading branch information
Showing
6 changed files
with
158 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
src/test/java/org/junit/tests/running/methods/SuperBridge.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
package org.junit.tests.running.methods; | ||
|
||
import org.junit.After; | ||
import org.junit.Before; | ||
import org.junit.Rule; | ||
import org.junit.rules.ExternalResource; | ||
import org.junit.rules.TestRule; | ||
|
||
/** Sample test class to test handling of bridge methods. */ | ||
abstract class SuperBridge { | ||
@Rule | ||
public TestRule rule() { | ||
return new ExternalResource() { | ||
@Override | ||
protected void before() throws Throwable { | ||
AnnotationTest.log += "super.rule().before() "; | ||
} | ||
|
||
@Override | ||
protected void after() { | ||
AnnotationTest.log += "super.rule().after() "; | ||
} | ||
}; | ||
} | ||
|
||
@Before | ||
public void before() { | ||
AnnotationTest.log += "super.before() "; | ||
} | ||
|
||
@After | ||
public void after() { | ||
AnnotationTest.log += "super.after() "; | ||
} | ||
} |