-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Avoid inner class cycle detection for non-matching predicate
JUnit 5.6 introduced inner class cycle detection in ReflectionSupport.findNestedClasses() (see #2039). Unfortunately, the cycle detection introduced a regression for test classes that contain classes with inner class cycles when those inner classes do not match the predicate supplied to findNestedClasses() (e.g., "is annotated with @nested"). Consequently, an exception is thrown for any inner class cycled detected, even if the cycle would not adversely affect test discovery or execution. This commit fixes this regression by avoiding inner class cycle detection for candidate classes that do match the predicate. For example, within JUnit Jupiter inner class cycle detection is now only performed for inner classes annotated with @nested. Fixes #2249
- Loading branch information
Showing
4 changed files
with
53 additions
and
12 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