File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/discovery Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 1414import static org .junit .platform .commons .support .AnnotationSupport .findAnnotation ;
1515import static org .junit .platform .commons .support .AnnotationSupport .isAnnotated ;
1616
17+ import java .util .Comparator ;
1718import java .util .List ;
1819import java .util .Optional ;
1920import java .util .function .Consumer ;
@@ -98,7 +99,7 @@ private void orderContainedMethods(ClassBasedTestDescriptor classBasedTestDescri
9899 DefaultMethodDescriptor ::new , //
99100 descriptorWrapperOrderer );
100101
101- if (methodOrderer .isEmpty ()) {
102+ if (! methodOrderer .isPresent ()) {
102103 // If there is an orderer, this is ensured by the call above
103104 classBasedTestDescriptor .orderChildren (methodsBeforeNestedClassesOrderer );
104105 }
@@ -143,7 +144,7 @@ private Optional<Consumer<MethodBasedTestDescriptor>> toValidationAction(Optiona
143144 }
144145
145146 private static UnaryOperator <List <TestDescriptor >> createMethodsBeforeNestedClassesOrderer () {
146- var methodsFirst = comparing (MethodBasedTestDescriptor .class ::isInstance ).reversed ();
147+ Comparator < Object > methodsFirst = comparing (MethodBasedTestDescriptor .class ::isInstance ).reversed ();
147148 return children -> {
148149 children .sort (methodsFirst );
149150 return children ;
You can’t perform that action at this time.
0 commit comments