Revise FilePatternResourceHintsRegistrar API and improve documentation

This commit revises the FilePatternResourceHintsRegistrar API and
introduces List<String> overrides of various var-args methods used with
the new builder API.

Closes gh-29161
This commit is contained in:
Sam Brannen
2023-09-07 16:34:47 +02:00
parent 453c0e5191
commit 1cdbd68aec
2 changed files with 137 additions and 73 deletions

View File

@@ -40,7 +40,7 @@ class FilePatternResourceHintsRegistrarTests {
@Test
void configureWithNoClasspathLocation() {
assertThatIllegalArgumentException().isThrownBy(FilePatternResourceHintsRegistrar::forClassPathLocations)
.withMessageContaining("At least one classpath location should be specified");
.withMessageContaining("At least one classpath location must be specified");
}
@Test
@@ -54,7 +54,7 @@ class FilePatternResourceHintsRegistrarTests {
void configureWithInvalidFileExtension() {
Builder builder = FilePatternResourceHintsRegistrar.forClassPathLocations("");
assertThatIllegalArgumentException().isThrownBy(() -> builder.withFileExtensions("txt"))
.withMessageContaining("should start with '.'");
.withMessageContaining("must start with '.'");
}
@Test