Polishing Optional usage
This commit is contained in:
committed by
Juergen Hoeller
parent
4e5723ca9e
commit
246e4977a2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2019 the original author or authors.
|
||||
* Copyright 2002-2024 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -44,7 +44,7 @@ class TestGroupsCondition implements ExecutionCondition {
|
||||
@Override
|
||||
public ConditionEvaluationResult evaluateExecutionCondition(ExtensionContext context) {
|
||||
Optional<EnabledForTestGroups> optional = findAnnotation(context.getElement(), EnabledForTestGroups.class);
|
||||
if (!optional.isPresent()) {
|
||||
if (optional.isEmpty()) {
|
||||
return ENABLED_BY_DEFAULT;
|
||||
}
|
||||
TestGroup[] testGroups = optional.get().value();
|
||||
|
||||
Reference in New Issue
Block a user