diff --git a/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/data/mongo/MongoHealthIndicator.java b/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/data/mongo/MongoHealthIndicator.java index 307fa646c8c..577120f4e64 100644 --- a/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/data/mongo/MongoHealthIndicator.java +++ b/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/data/mongo/MongoHealthIndicator.java @@ -37,7 +37,7 @@ public class MongoHealthIndicator extends AbstractHealthIndicator { public MongoHealthIndicator(MongoTemplate mongoTemplate) { super("MongoDB health check failed"); - Assert.notNull(mongoTemplate, "MongoTemplate must not be null"); + Assert.notNull(mongoTemplate, "'mongoTemplate' must not be null"); this.mongoTemplate = mongoTemplate; } diff --git a/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/jmx/JmxEndpointExporter.java b/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/jmx/JmxEndpointExporter.java index b0c0e7d5cdd..159e010d22f 100644 --- a/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/jmx/JmxEndpointExporter.java +++ b/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/jmx/JmxEndpointExporter.java @@ -95,7 +95,7 @@ public class JmxEndpointExporter implements InitializingBean, DisposableBean, Be } private ObjectName register(ExposableJmxEndpoint endpoint) { - Assert.notNull(endpoint, "Endpoint must not be null"); + Assert.notNull(endpoint, "'endpoint' must not be null"); try { ObjectName name = this.objectNameFactory.getObjectName(endpoint); EndpointMBean mbean = new EndpointMBean(this.responseMapper, this.classLoader, endpoint); diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/servlet/error/DefaultErrorViewResolver.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/servlet/error/DefaultErrorViewResolver.java index 23474a1dc5b..39659420bf7 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/servlet/error/DefaultErrorViewResolver.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/servlet/error/DefaultErrorViewResolver.java @@ -81,8 +81,8 @@ public class DefaultErrorViewResolver implements ErrorViewResolver, Ordered { * @since 2.4.0 */ public DefaultErrorViewResolver(ApplicationContext applicationContext, Resources resources) { - Assert.notNull(applicationContext, "ApplicationContext must not be null"); - Assert.notNull(resources, "Resources must not be null"); + Assert.notNull(applicationContext, "'applicationContext' must not be null"); + Assert.notNull(resources, "'resources' must not be null"); this.applicationContext = applicationContext; this.resources = resources; this.templateAvailabilityProviders = new TemplateAvailabilityProviders(applicationContext); diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/quartz/QuartzAutoConfigurationTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/quartz/QuartzAutoConfigurationTests.java index 23aabcf5776..34d54264ff4 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/quartz/QuartzAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/quartz/QuartzAutoConfigurationTests.java @@ -574,7 +574,7 @@ class QuartzAutoConfigurationTests { static class ComponentThatUsesScheduler { ComponentThatUsesScheduler(Scheduler scheduler) { - Assert.notNull(scheduler, "Scheduler must not be null"); + Assert.notNull(scheduler, "'scheduler' must not be null"); } } diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/session/SessionAutoConfigurationEarlyInitializationIntegrationTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/session/SessionAutoConfigurationEarlyInitializationIntegrationTests.java index da11c9381ca..3b40cffc7ba 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/session/SessionAutoConfigurationEarlyInitializationIntegrationTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/session/SessionAutoConfigurationEarlyInitializationIntegrationTests.java @@ -57,7 +57,7 @@ class SessionAutoConfigurationEarlyInitializationIntegrationTests { @Bean MapSessionRepository mapSessionRepository(ConfigurableApplicationContext context) { - Assert.isTrue(context.getBeanFactory().isConfigurationFrozen(), "Context should be frozen"); + Assert.isTrue(context.getBeanFactory().isConfigurationFrozen(), "'context' should be frozen"); return new MapSessionRepository(new LinkedHashMap<>()); } diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/servlet/error/DefaultErrorViewResolverTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/servlet/error/DefaultErrorViewResolverTests.java index 1f4b6e4599d..e9e24e34df7 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/servlet/error/DefaultErrorViewResolverTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/servlet/error/DefaultErrorViewResolverTests.java @@ -83,14 +83,14 @@ class DefaultErrorViewResolverTests { @Test void createWhenApplicationContextIsNullShouldThrowException() { assertThatIllegalArgumentException().isThrownBy(() -> new DefaultErrorViewResolver(null, new Resources())) - .withMessageContaining("ApplicationContext must not be null"); + .withMessageContaining("'applicationContext' must not be null"); } @Test void createWhenResourcePropertiesIsNullShouldThrowException() { assertThatIllegalArgumentException() .isThrownBy(() -> new DefaultErrorViewResolver(mock(ApplicationContext.class), (Resources) null)) - .withMessageContaining("Resources must not be null"); + .withMessageContaining("'resources' must not be null"); } @Test diff --git a/spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/remote/server/HttpStatusHandler.java b/spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/remote/server/HttpStatusHandler.java index 218e6796e00..42f30cc3829 100644 --- a/spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/remote/server/HttpStatusHandler.java +++ b/spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/remote/server/HttpStatusHandler.java @@ -47,7 +47,7 @@ public class HttpStatusHandler implements Handler { * @param status the status */ public HttpStatusHandler(HttpStatus status) { - Assert.notNull(status, "Status must not be null"); + Assert.notNull(status, "'status' must not be null"); this.status = status; } diff --git a/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/remote/server/HttpStatusHandlerTests.java b/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/remote/server/HttpStatusHandlerTests.java index 4adef396240..886ecf37ed5 100644 --- a/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/remote/server/HttpStatusHandlerTests.java +++ b/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/remote/server/HttpStatusHandlerTests.java @@ -56,7 +56,7 @@ class HttpStatusHandlerTests { @Test void statusMustNotBeNull() { assertThatIllegalArgumentException().isThrownBy(() -> new HttpStatusHandler(null)) - .withMessageContaining("Status must not be null"); + .withMessageContaining("'status' must not be null"); } @Test diff --git a/spring-boot-project/spring-boot-test/src/main/java/org/springframework/boot/test/mock/mockito/SpringBootMockResolver.java b/spring-boot-project/spring-boot-test/src/main/java/org/springframework/boot/test/mock/mockito/SpringBootMockResolver.java index c78ce88b213..996ef637f22 100644 --- a/spring-boot-project/spring-boot-test/src/main/java/org/springframework/boot/test/mock/mockito/SpringBootMockResolver.java +++ b/spring-boot-project/spring-boot-test/src/main/java/org/springframework/boot/test/mock/mockito/SpringBootMockResolver.java @@ -44,7 +44,7 @@ public class SpringBootMockResolver implements MockResolver { @SuppressWarnings("unchecked") private static T getUltimateTargetObject(Object candidate) { - Assert.notNull(candidate, "Candidate must not be null"); + Assert.notNull(candidate, "'candidate' must not be null"); try { if (AopUtils.isAopProxy(candidate) && candidate instanceof Advised advised) { TargetSource targetSource = advised.getTargetSource(); diff --git a/spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/main/java/org/springframework/boot/buildpack/platform/build/BuildpackCoordinates.java b/spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/main/java/org/springframework/boot/buildpack/platform/build/BuildpackCoordinates.java index 954ddd90258..9f39c674a6a 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/main/java/org/springframework/boot/buildpack/platform/build/BuildpackCoordinates.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/main/java/org/springframework/boot/buildpack/platform/build/BuildpackCoordinates.java @@ -42,7 +42,7 @@ final class BuildpackCoordinates { private final String version; private BuildpackCoordinates(String id, String version) { - Assert.hasText(id, "ID must not be empty"); + Assert.hasText(id, "'id' must not be empty"); this.id = id; this.version = version; } @@ -123,7 +123,7 @@ final class BuildpackCoordinates { * @return a new {@link BuildpackCoordinates} instance */ static BuildpackCoordinates fromBuildpackMetadata(BuildpackMetadata buildpackMetadata) { - Assert.notNull(buildpackMetadata, "BuildpackMetadata must not be null"); + Assert.notNull(buildpackMetadata, "'buildpackMetadata' must not be null"); return new BuildpackCoordinates(buildpackMetadata.getId(), buildpackMetadata.getVersion()); } diff --git a/spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/main/java/org/springframework/boot/buildpack/platform/docker/configuration/DockerConfiguration.java b/spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/main/java/org/springframework/boot/buildpack/platform/docker/configuration/DockerConfiguration.java index 9a650d42bda..e04f4c9cb10 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/main/java/org/springframework/boot/buildpack/platform/docker/configuration/DockerConfiguration.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/main/java/org/springframework/boot/buildpack/platform/docker/configuration/DockerConfiguration.java @@ -81,7 +81,7 @@ public final class DockerConfiguration { } public DockerConfiguration withBuilderRegistryTokenAuthentication(String token) { - Assert.notNull(token, "Token must not be null"); + Assert.notNull(token, "'token' must not be null"); return new DockerConfiguration(this.host, new DockerRegistryTokenAuthentication(token), this.publishAuthentication, this.bindHostToBuilder); } diff --git a/spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/test/java/org/springframework/boot/buildpack/platform/build/BuildpackCoordinatesTests.java b/spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/test/java/org/springframework/boot/buildpack/platform/build/BuildpackCoordinatesTests.java index 5a2820a85fc..bad30a3a562 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/test/java/org/springframework/boot/buildpack/platform/build/BuildpackCoordinatesTests.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/test/java/org/springframework/boot/buildpack/platform/build/BuildpackCoordinatesTests.java @@ -99,7 +99,7 @@ class BuildpackCoordinatesTests extends AbstractJsonTests { @Test void fromBuildpackMetadataWhenMetadataIsNullThrowsException() { assertThatIllegalArgumentException().isThrownBy(() -> BuildpackCoordinates.fromBuildpackMetadata(null)) - .withMessage("BuildpackMetadata must not be null"); + .withMessage("'buildpackMetadata' must not be null"); } @Test @@ -113,7 +113,7 @@ class BuildpackCoordinatesTests extends AbstractJsonTests { @Test void ofWhenIdIsNullThrowsException() { assertThatIllegalArgumentException().isThrownBy(() -> BuildpackCoordinates.of(null, null)) - .withMessage("ID must not be empty"); + .withMessage("'id' must not be empty"); } @Test diff --git a/spring-boot-project/spring-boot-tools/spring-boot-loader-tools/src/main/java/org/springframework/boot/loader/tools/Layer.java b/spring-boot-project/spring-boot-tools/spring-boot-loader-tools/src/main/java/org/springframework/boot/loader/tools/Layer.java index 544a7ec772c..f64dc19cfda 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-loader-tools/src/main/java/org/springframework/boot/loader/tools/Layer.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-loader-tools/src/main/java/org/springframework/boot/loader/tools/Layer.java @@ -40,7 +40,7 @@ public class Layer { * @param name the name of the layer. */ public Layer(String name) { - Assert.hasText(name, "Name must not be empty"); + Assert.hasText(name, "'name' must not be empty"); Assert.isTrue(PATTERN.matcher(name).matches(), () -> "Malformed layer name '" + name + "'"); Assert.isTrue(!name.equalsIgnoreCase("ext") && !name.toLowerCase(Locale.ROOT).startsWith("springboot"), () -> "Layer name '" + name + "' is reserved"); diff --git a/spring-boot-project/spring-boot-tools/spring-boot-loader-tools/src/main/java/org/springframework/boot/loader/tools/Packager.java b/spring-boot-project/spring-boot-tools/spring-boot-loader-tools/src/main/java/org/springframework/boot/loader/tools/Packager.java index 07fa54e6635..2ab0ec42dce 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-loader-tools/src/main/java/org/springframework/boot/loader/tools/Packager.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-loader-tools/src/main/java/org/springframework/boot/loader/tools/Packager.java @@ -107,9 +107,9 @@ public abstract class Packager { * @param source the source archive file to package */ protected Packager(File source) { - Assert.notNull(source, "Source file must not be null"); + Assert.notNull(source, "'source' file must not be null"); Assert.isTrue(source.exists() && source.isFile(), - () -> "Source must refer to an existing file, got " + source.getAbsolutePath()); + () -> "'source' must refer to an existing file, got " + source.getAbsolutePath()); this.source = source.getAbsoluteFile(); } @@ -163,7 +163,7 @@ public abstract class Packager { * @param layers the jar layers */ public void setLayers(Layers layers) { - Assert.notNull(layers, "Layers must not be null"); + Assert.notNull(layers, "'layers' must not be null"); this.layers = layers; this.layersIndex = new LayersIndex(layers); } @@ -204,7 +204,7 @@ public abstract class Packager { protected final void write(JarFile sourceJar, Libraries libraries, AbstractJarWriter writer, boolean ensureReproducibleBuild) throws IOException { - Assert.notNull(libraries, "Libraries must not be null"); + Assert.notNull(libraries, "'libraries' must not be null"); write(sourceJar, writer, new PackagedLibraries(libraries, ensureReproducibleBuild)); } diff --git a/spring-boot-project/spring-boot-tools/spring-boot-loader-tools/src/main/java/org/springframework/boot/loader/tools/layer/ApplicationContentFilter.java b/spring-boot-project/spring-boot-tools/spring-boot-loader-tools/src/main/java/org/springframework/boot/loader/tools/layer/ApplicationContentFilter.java index 734ea7e2605..6bc5c449082 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-loader-tools/src/main/java/org/springframework/boot/loader/tools/layer/ApplicationContentFilter.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-loader-tools/src/main/java/org/springframework/boot/loader/tools/layer/ApplicationContentFilter.java @@ -34,7 +34,7 @@ public class ApplicationContentFilter implements ContentFilter { private final String pattern; public ApplicationContentFilter(String pattern) { - Assert.hasText(pattern, "Pattern must not be empty"); + Assert.hasText(pattern, "'pattern' must not be empty"); this.pattern = pattern; } diff --git a/spring-boot-project/spring-boot-tools/spring-boot-loader-tools/src/main/java/org/springframework/boot/loader/tools/layer/CustomLayers.java b/spring-boot-project/spring-boot-tools/spring-boot-loader-tools/src/main/java/org/springframework/boot/loader/tools/layer/CustomLayers.java index c8334b5b160..0aa92818130 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-loader-tools/src/main/java/org/springframework/boot/loader/tools/layer/CustomLayers.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-loader-tools/src/main/java/org/springframework/boot/loader/tools/layer/CustomLayers.java @@ -44,10 +44,10 @@ public class CustomLayers implements Layers { public CustomLayers(List layers, List> applicationSelectors, List> librarySelectors) { - Assert.notNull(layers, "Layers must not be null"); - Assert.notNull(applicationSelectors, "ApplicationSelectors must not be null"); + Assert.notNull(layers, "'layers' must not be null"); + Assert.notNull(applicationSelectors, "'applicationSelectors' must not be null"); validateSelectorLayers(applicationSelectors, layers); - Assert.notNull(librarySelectors, "LibrarySelectors must not be null"); + Assert.notNull(librarySelectors, "'librarySelectors' must not be null"); validateSelectorLayers(librarySelectors, layers); this.layers = new ArrayList<>(layers); this.applicationSelectors = new ArrayList<>(applicationSelectors); diff --git a/spring-boot-project/spring-boot-tools/spring-boot-loader-tools/src/main/java/org/springframework/boot/loader/tools/layer/IncludeExcludeContentSelector.java b/spring-boot-project/spring-boot-tools/spring-boot-loader-tools/src/main/java/org/springframework/boot/loader/tools/layer/IncludeExcludeContentSelector.java index 947f3959d27..ef42768f139 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-loader-tools/src/main/java/org/springframework/boot/loader/tools/layer/IncludeExcludeContentSelector.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-loader-tools/src/main/java/org/springframework/boot/loader/tools/layer/IncludeExcludeContentSelector.java @@ -47,8 +47,8 @@ public class IncludeExcludeContentSelector implements ContentSelector { public IncludeExcludeContentSelector(Layer layer, List includes, List excludes, Function> filterFactory) { - Assert.notNull(layer, "Layer must not be null"); - Assert.notNull(filterFactory, "FilterFactory must not be null"); + Assert.notNull(layer, "'layer' must not be null"); + Assert.notNull(filterFactory, "'filterFactory' must not be null"); this.layer = layer; this.includes = (includes != null) ? adapt(includes, filterFactory) : Collections.emptyList(); this.excludes = (excludes != null) ? adapt(excludes, filterFactory) : Collections.emptyList(); diff --git a/spring-boot-project/spring-boot-tools/spring-boot-loader-tools/src/main/java/org/springframework/boot/loader/tools/layer/LibraryContentFilter.java b/spring-boot-project/spring-boot-tools/spring-boot-loader-tools/src/main/java/org/springframework/boot/loader/tools/layer/LibraryContentFilter.java index 295994c6bd9..da6083df6c5 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-loader-tools/src/main/java/org/springframework/boot/loader/tools/layer/LibraryContentFilter.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-loader-tools/src/main/java/org/springframework/boot/loader/tools/layer/LibraryContentFilter.java @@ -36,7 +36,7 @@ public class LibraryContentFilter implements ContentFilter { private final Pattern pattern; public LibraryContentFilter(String coordinatesPattern) { - Assert.hasText(coordinatesPattern, "CoordinatesPattern must not be empty"); + Assert.hasText(coordinatesPattern, "'coordinatesPattern' must not be empty"); StringBuilder regex = new StringBuilder(); for (int i = 0; i < coordinatesPattern.length(); i++) { char c = coordinatesPattern.charAt(i); diff --git a/spring-boot-project/spring-boot-tools/spring-boot-loader-tools/src/test/java/org/springframework/boot/loader/tools/AbstractPackagerTests.java b/spring-boot-project/spring-boot-tools/spring-boot-loader-tools/src/test/java/org/springframework/boot/loader/tools/AbstractPackagerTests.java index 8962c11a4d2..f9f1c31b3fb 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-loader-tools/src/test/java/org/springframework/boot/loader/tools/AbstractPackagerTests.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-loader-tools/src/test/java/org/springframework/boot/loader/tools/AbstractPackagerTests.java @@ -182,7 +182,7 @@ abstract class AbstractPackagerTests

{ this.testJarFile.addClass("a/b/C.class", ClassWithMainMethod.class); P packager = createPackager(); assertThatIllegalArgumentException().isThrownBy(() -> execute(packager, null)) - .withMessageContaining("Libraries must not be null"); + .withMessageContaining("'libraries' must not be null"); } @Test diff --git a/spring-boot-project/spring-boot-tools/spring-boot-loader-tools/src/test/java/org/springframework/boot/loader/tools/LayerTests.java b/spring-boot-project/spring-boot-tools/spring-boot-loader-tools/src/test/java/org/springframework/boot/loader/tools/LayerTests.java index 0328e2b9f10..d4f6e0784dc 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-loader-tools/src/test/java/org/springframework/boot/loader/tools/LayerTests.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-loader-tools/src/test/java/org/springframework/boot/loader/tools/LayerTests.java @@ -31,12 +31,12 @@ class LayerTests { @Test void createWhenNameIsNullThrowsException() { - assertThatIllegalArgumentException().isThrownBy(() -> new Layer(null)).withMessage("Name must not be empty"); + assertThatIllegalArgumentException().isThrownBy(() -> new Layer(null)).withMessage("'name' must not be empty"); } @Test void createWhenNameIsEmptyThrowsException() { - assertThatIllegalArgumentException().isThrownBy(() -> new Layer("")).withMessage("Name must not be empty"); + assertThatIllegalArgumentException().isThrownBy(() -> new Layer("")).withMessage("'name' must not be empty"); } @Test diff --git a/spring-boot-project/spring-boot-tools/spring-boot-loader-tools/src/test/java/org/springframework/boot/loader/tools/layer/ApplicationContentFilterTests.java b/spring-boot-project/spring-boot-tools/spring-boot-loader-tools/src/test/java/org/springframework/boot/loader/tools/layer/ApplicationContentFilterTests.java index fd2e7838f99..800859f8967 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-loader-tools/src/test/java/org/springframework/boot/loader/tools/layer/ApplicationContentFilterTests.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-loader-tools/src/test/java/org/springframework/boot/loader/tools/layer/ApplicationContentFilterTests.java @@ -33,13 +33,13 @@ class ApplicationContentFilterTests { @Test void createWhenPatternIsNullThrowsException() { assertThatIllegalArgumentException().isThrownBy(() -> new ApplicationContentFilter(null)) - .withMessage("Pattern must not be empty"); + .withMessage("'pattern' must not be empty"); } @Test void createWhenPatternIsEmptyThrowsException() { assertThatIllegalArgumentException().isThrownBy(() -> new ApplicationContentFilter("")) - .withMessage("Pattern must not be empty"); + .withMessage("'pattern' must not be empty"); } @Test diff --git a/spring-boot-project/spring-boot-tools/spring-boot-loader-tools/src/test/java/org/springframework/boot/loader/tools/layer/IncludeExcludeContentSelectorTests.java b/spring-boot-project/spring-boot-tools/spring-boot-loader-tools/src/test/java/org/springframework/boot/loader/tools/layer/IncludeExcludeContentSelectorTests.java index f012acdcab3..d908e8bbc93 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-loader-tools/src/test/java/org/springframework/boot/loader/tools/layer/IncludeExcludeContentSelectorTests.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-loader-tools/src/test/java/org/springframework/boot/loader/tools/layer/IncludeExcludeContentSelectorTests.java @@ -42,14 +42,14 @@ class IncludeExcludeContentSelectorTests { assertThatIllegalArgumentException() .isThrownBy( () -> new IncludeExcludeContentSelector<>(null, Collections.emptyList(), Collections.emptyList())) - .withMessage("Layer must not be null"); + .withMessage("'layer' must not be null"); } @Test void createWhenFactoryIsNullThrowsException() { assertThatIllegalArgumentException() .isThrownBy(() -> new IncludeExcludeContentSelector<>(LAYER, null, null, null)) - .withMessage("FilterFactory must not be null"); + .withMessage("'filterFactory' must not be null"); } @Test diff --git a/spring-boot-project/spring-boot-tools/spring-boot-loader-tools/src/test/java/org/springframework/boot/loader/tools/layer/LibraryContentFilterTests.java b/spring-boot-project/spring-boot-tools/spring-boot-loader-tools/src/test/java/org/springframework/boot/loader/tools/layer/LibraryContentFilterTests.java index b6dd41c06cc..acf4f876401 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-loader-tools/src/test/java/org/springframework/boot/loader/tools/layer/LibraryContentFilterTests.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-loader-tools/src/test/java/org/springframework/boot/loader/tools/layer/LibraryContentFilterTests.java @@ -38,13 +38,13 @@ class LibraryContentFilterTests { @Test void createWhenCoordinatesPatternIsNullThrowsException() { assertThatIllegalArgumentException().isThrownBy(() -> new LibraryContentFilter(null)) - .withMessage("CoordinatesPattern must not be empty"); + .withMessage("'coordinatesPattern' must not be empty"); } @Test void createWhenCoordinatesPatternIsEmptyThrowsException() { assertThatIllegalArgumentException().isThrownBy(() -> new LibraryContentFilter("")) - .withMessage("CoordinatesPattern must not be empty"); + .withMessage("'coordinatesPattern' must not be empty"); } @Test diff --git a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/BootstrapRegistry.java b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/BootstrapRegistry.java index b983d03f418..5870aefaab2 100644 --- a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/BootstrapRegistry.java +++ b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/BootstrapRegistry.java @@ -121,7 +121,7 @@ public interface BootstrapRegistry { * @since 2.4.2 */ default InstanceSupplier withScope(Scope scope) { - Assert.notNull(scope, "Scope must not be null"); + Assert.notNull(scope, "'scope' must not be null"); InstanceSupplier parent = this; return new InstanceSupplier<>() { diff --git a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/properties/source/ConfigurationPropertyName.java b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/properties/source/ConfigurationPropertyName.java index bd1e7f1dda0..3c4b0823b9d 100644 --- a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/properties/source/ConfigurationPropertyName.java +++ b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/properties/source/ConfigurationPropertyName.java @@ -273,7 +273,7 @@ public final class ConfigurationPropertyName implements Comparable= name.getNumberOfElements()) { return false; } @@ -612,7 +612,7 @@ public final class ConfigurationPropertyName implements Comparable pairs) { - Assert.notNull(name, "fieldName must not be null"); + Assert.notNull(name, "'name' must not be null"); if (!FIELD_NAME_VALID_PATTERN.matcher(name).matches()) { logger.warn(LogMessage.format("'%s' is not a valid field name according to GELF standard", name)); return; diff --git a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/logging/logback/GraylogExtendedLogFormatStructuredLogFormatter.java b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/logging/logback/GraylogExtendedLogFormatStructuredLogFormatter.java index cd5abd28481..0bfb243e0ca 100644 --- a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/logging/logback/GraylogExtendedLogFormatStructuredLogFormatter.java +++ b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/logging/logback/GraylogExtendedLogFormatStructuredLogFormatter.java @@ -133,7 +133,7 @@ class GraylogExtendedLogFormatStructuredLogFormatter extends JsonWriterStructure } private static void createAdditionalField(String name, Object value, BiConsumer pairs) { - Assert.notNull(name, "fieldName must not be null"); + Assert.notNull(name, "'name' must not be null"); if (!FIELD_NAME_VALID_PATTERN.matcher(name).matches()) { logger.warn(LogMessage.format("'%s' is not a valid field name according to GELF standard", name)); return; diff --git a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/ssl/SslManagerBundle.java b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/ssl/SslManagerBundle.java index 330ab2eb183..30a7066cdb4 100644 --- a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/ssl/SslManagerBundle.java +++ b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/ssl/SslManagerBundle.java @@ -132,7 +132,7 @@ public interface SslManagerBundle { * @since 3.5.0 */ static SslManagerBundle from(TrustManagerFactory trustManagerFactory) { - Assert.notNull(trustManagerFactory, "TrustManagerFactory must not be null"); + Assert.notNull(trustManagerFactory, "'trustManagerFactory' must not be null"); KeyManagerFactory defaultKeyManagerFactory = createDefaultKeyManagerFactory(); return of(defaultKeyManagerFactory, trustManagerFactory); } @@ -145,7 +145,7 @@ public interface SslManagerBundle { * @since 3.5.0 */ static SslManagerBundle from(TrustManager... trustManagers) { - Assert.notNull(trustManagers, "TrustManagers must not be null"); + Assert.notNull(trustManagers, "'trustManagers' must not be null"); KeyManagerFactory defaultKeyManagerFactory = createDefaultKeyManagerFactory(); TrustManagerFactory defaultTrustManagerFactory = createDefaultTrustManagerFactory(); return of(defaultKeyManagerFactory, FixedTrustManagerFactory.of(defaultTrustManagerFactory, trustManagers)); diff --git a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/task/SimpleAsyncTaskSchedulerBuilder.java b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/task/SimpleAsyncTaskSchedulerBuilder.java index 2424a6d6cac..9a543fe9475 100644 --- a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/task/SimpleAsyncTaskSchedulerBuilder.java +++ b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/task/SimpleAsyncTaskSchedulerBuilder.java @@ -131,7 +131,7 @@ public class SimpleAsyncTaskSchedulerBuilder { * @see #additionalCustomizers(SimpleAsyncTaskSchedulerCustomizer...) */ public SimpleAsyncTaskSchedulerBuilder customizers(SimpleAsyncTaskSchedulerCustomizer... customizers) { - Assert.notNull(customizers, "Customizers must not be null"); + Assert.notNull(customizers, "'customizers' must not be null"); return customizers(Arrays.asList(customizers)); } @@ -146,7 +146,7 @@ public class SimpleAsyncTaskSchedulerBuilder { */ public SimpleAsyncTaskSchedulerBuilder customizers( Iterable customizers) { - Assert.notNull(customizers, "Customizers must not be null"); + Assert.notNull(customizers, "'customizers' must not be null"); return new SimpleAsyncTaskSchedulerBuilder(this.threadNamePrefix, this.concurrencyLimit, this.virtualThreads, this.taskTerminationTimeout, this.taskDecorator, append(null, customizers)); } @@ -160,7 +160,7 @@ public class SimpleAsyncTaskSchedulerBuilder { * @see #customizers(SimpleAsyncTaskSchedulerCustomizer...) */ public SimpleAsyncTaskSchedulerBuilder additionalCustomizers(SimpleAsyncTaskSchedulerCustomizer... customizers) { - Assert.notNull(customizers, "Customizers must not be null"); + Assert.notNull(customizers, "'customizers' must not be null"); return additionalCustomizers(Arrays.asList(customizers)); } @@ -174,7 +174,7 @@ public class SimpleAsyncTaskSchedulerBuilder { */ public SimpleAsyncTaskSchedulerBuilder additionalCustomizers( Iterable customizers) { - Assert.notNull(customizers, "Customizers must not be null"); + Assert.notNull(customizers, "'customizers' must not be null"); return new SimpleAsyncTaskSchedulerBuilder(this.threadNamePrefix, this.concurrencyLimit, this.virtualThreads, this.taskTerminationTimeout, this.taskDecorator, append(this.customizers, customizers)); } diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/properties/bind/ValueObjectBinderTests.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/properties/bind/ValueObjectBinderTests.java index 4b843c7d62c..a52651c2400 100644 --- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/properties/bind/ValueObjectBinderTests.java +++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/properties/bind/ValueObjectBinderTests.java @@ -674,7 +674,7 @@ class ValueObjectBinderTests { private final String bar; ValidatingConstructorBean(String foo, String bar) { - Assert.notNull(foo, "Foo must not be null"); + Assert.notNull(foo, "'foo' must not be null"); this.foo = foo; this.bar = bar; } diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/properties/source/ConfigurationPropertyNameTests.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/properties/source/ConfigurationPropertyNameTests.java index 707e4468670..7d399a294d0 100644 --- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/properties/source/ConfigurationPropertyNameTests.java +++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/properties/source/ConfigurationPropertyNameTests.java @@ -42,7 +42,7 @@ class ConfigurationPropertyNameTests { @Test void ofNameShouldNotBeNull() { assertThatIllegalArgumentException().isThrownBy(() -> ConfigurationPropertyName.of(null)) - .withMessageContaining("Name must not be null"); + .withMessageContaining("'name' must not be null"); } @Test diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/origin/MockOrigin.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/origin/MockOrigin.java index 7774ce5795f..39032bee279 100644 --- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/origin/MockOrigin.java +++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/origin/MockOrigin.java @@ -30,7 +30,7 @@ public final class MockOrigin implements Origin { private final Origin parent; private MockOrigin(String value, Origin parent) { - Assert.notNull(value, "Value must not be null"); + Assert.notNull(value, "'value' must not be null"); this.value = value; this.parent = parent; } diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/task/SimpleAsyncTaskSchedulerBuilderTests.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/task/SimpleAsyncTaskSchedulerBuilderTests.java index d4ee1145768..fd866142b70 100644 --- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/task/SimpleAsyncTaskSchedulerBuilderTests.java +++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/task/SimpleAsyncTaskSchedulerBuilderTests.java @@ -79,14 +79,14 @@ class SimpleAsyncTaskSchedulerBuilderTests { void customizersWhenCustomizersAreNullShouldThrowException() { assertThatIllegalArgumentException() .isThrownBy(() -> this.builder.customizers((SimpleAsyncTaskSchedulerCustomizer[]) null)) - .withMessageContaining("Customizers must not be null"); + .withMessageContaining("'customizers' must not be null"); } @Test void customizersCollectionWhenCustomizersAreNullShouldThrowException() { assertThatIllegalArgumentException() .isThrownBy(() -> this.builder.customizers((Set) null)) - .withMessageContaining("Customizers must not be null"); + .withMessageContaining("'customizers' must not be null"); } @Test @@ -121,14 +121,14 @@ class SimpleAsyncTaskSchedulerBuilderTests { void additionalCustomizersWhenCustomizersAreNullShouldThrowException() { assertThatIllegalArgumentException() .isThrownBy(() -> this.builder.additionalCustomizers((SimpleAsyncTaskSchedulerCustomizer[]) null)) - .withMessageContaining("Customizers must not be null"); + .withMessageContaining("'customizers' must not be null"); } @Test void additionalCustomizersCollectionWhenCustomizersAreNullShouldThrowException() { assertThatIllegalArgumentException() .isThrownBy(() -> this.builder.additionalCustomizers((Set) null)) - .withMessageContaining("Customizers must not be null"); + .withMessageContaining("'customizers' must not be null"); } @Test