Skip to content

Reject blank value for @SuiteDisplayName #4810

@sbrannen

Description

@sbrannen

Overview

While investigating #4714, I noticed that we currently ignore a blank value for @SuiteDisplayName.

private static String getSuiteDisplayName(Class<?> testClass) {
// @formatter:off
return findAnnotation(testClass, SuiteDisplayName.class)
.map(SuiteDisplayName::value)
.filter(StringUtils::isNotBlank)
.orElse(testClass.getSimpleName());
// @formatter:on
}

However, the Javadoc for org.junit.platform.suite.api.SuiteDisplayName.value() clearly states that the value is:

never blank or consisting solely of whitespace

We should therefore reject blank values for @SuiteDisplayName in 6.0, along the lines of similar changes in 6.0.

Related Issues

Metadata

Metadata

Assignees

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions