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 14
14
import static org .junit .platform .commons .support .AnnotationSupport .findAnnotation ;
15
15
import static org .junit .platform .commons .support .AnnotationSupport .isAnnotated ;
16
16
17
+ import java .util .Comparator ;
17
18
import java .util .List ;
18
19
import java .util .Optional ;
19
20
import java .util .function .Consumer ;
@@ -98,7 +99,7 @@ private void orderContainedMethods(ClassBasedTestDescriptor classBasedTestDescri
98
99
DefaultMethodDescriptor ::new , //
99
100
descriptorWrapperOrderer );
100
101
101
- if (methodOrderer .isEmpty ()) {
102
+ if (! methodOrderer .isPresent ()) {
102
103
// If there is an orderer, this is ensured by the call above
103
104
classBasedTestDescriptor .orderChildren (methodsBeforeNestedClassesOrderer );
104
105
}
@@ -143,7 +144,7 @@ private Optional<Consumer<MethodBasedTestDescriptor>> toValidationAction(Optiona
143
144
}
144
145
145
146
private static UnaryOperator <List <TestDescriptor >> createMethodsBeforeNestedClassesOrderer () {
146
- var methodsFirst = comparing (MethodBasedTestDescriptor .class ::isInstance ).reversed ();
147
+ Comparator < Object > methodsFirst = comparing (MethodBasedTestDescriptor .class ::isInstance ).reversed ();
147
148
return children -> {
148
149
children .sort (methodsFirst );
149
150
return children ;
You can’t perform that action at this time.
0 commit comments