Skip to content

Commit

Permalink
pmd
Browse files Browse the repository at this point in the history
  • Loading branch information
baev committed Mar 18, 2024
1 parent 548a9c0 commit d64c635
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,12 @@ public boolean beforeScenario(final ScenarioRuntime sr) {
}

private static String getName(final Scenario scenario, final String defaultValue) {
return Objects.isNull(scenario.getName()) || scenario.getName().trim().isEmpty()
? defaultValue
: scenario.getName().trim();
if (Objects.isNull(scenario.getName())) {
return defaultValue;
}
final boolean blank = scenario.getName().chars()
.allMatch(Character::isWhitespace);
return blank ? defaultValue : scenario.getName().trim();
}

@Override
Expand Down

0 comments on commit d64c635

Please sign in to comment.