forked from junit-team/junit5
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve performance of ParameterizedTestSpiInstantiator
Since Class.getDeclaredConstructors() clones the constructors array AND makes "child copies" of the constructors, it's usually better to avoid repeated calls to getDeclaredConstructors() for a single use case. In addition, it's good to avoid the use of Optional, multiple Streams, and try-catch blocks if feasible. This commit reworks ParameterizedTestSpiInstantiator in order to achieve that by switching to old-school Java constructs like arrays, for-loops, and if-blocks. See junit-team#4018 See junit-team#4025
- Loading branch information
Showing
1 changed file
with
24 additions
and
28 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