From 566c9e2a285a2da1266bd004ef4aaa461aac0f04 Mon Sep 17 00:00:00 2001 From: "Khan, C M Abdullah" Date: Sat, 1 Jun 2024 01:01:35 +0600 Subject: [PATCH 1/2] Fix typos in method names and javadoc; update the documentation to ensure it is more understandable and coherent. --- .../boot/actuate/endpoint/SanitizableData.java | 2 +- .../endpoint/annotation/DiscoveredOperationMethod.java | 4 ++-- .../modules/reference/pages/testing/testcontainers.adoc | 2 +- .../boot/test/context/SpringBootContextLoader.java | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/SanitizableData.java b/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/SanitizableData.java index df399bae449d..2dfa70c06335 100644 --- a/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/SanitizableData.java +++ b/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/SanitizableData.java @@ -76,7 +76,7 @@ public Object getValue() { } /** - * Return a new {@link SanitizableData} instance with sanatized value. + * Return a new {@link SanitizableData} instance with sanitized value. * @return a new sanitizable data instance. * @since 3.1.0 */ diff --git a/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/annotation/DiscoveredOperationMethod.java b/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/annotation/DiscoveredOperationMethod.java index 4eb94e4066d0..1658623dc4d7 100644 --- a/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/annotation/DiscoveredOperationMethod.java +++ b/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/annotation/DiscoveredOperationMethod.java @@ -44,11 +44,11 @@ public DiscoveredOperationMethod(Method method, OperationType operationType, Assert.notNull(annotationAttributes, "AnnotationAttributes must not be null"); List producesMediaTypes = new ArrayList<>(); producesMediaTypes.addAll(Arrays.asList(annotationAttributes.getStringArray("produces"))); - producesMediaTypes.addAll(getProducesFromProducable(annotationAttributes)); + producesMediaTypes.addAll(getProducesFromProducible(annotationAttributes)); this.producesMediaTypes = Collections.unmodifiableList(producesMediaTypes); } - private & Producible> List getProducesFromProducable( + private & Producible> List getProducesFromProducible( AnnotationAttributes annotationAttributes) { Class type = getProducesFrom(annotationAttributes); if (type == Producible.class) { diff --git a/spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/testing/testcontainers.adoc b/spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/testing/testcontainers.adoc index 90402c41135e..d134ed512629 100644 --- a/spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/testing/testcontainers.adoc +++ b/spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/testing/testcontainers.adoc @@ -3,7 +3,7 @@ The https://www.testcontainers.org/[Testcontainers] library provides a way to manage services running inside Docker containers. It integrates with JUnit, allowing you to write a test class that can start up a container before any of the tests run. -Testcontainers is especially useful for writing integration tests that talk to a real backend service such as MySQL, MongoDB, Cassandra and others. +Testcontainers are especially useful for writing integration tests that talk to a real backend service such as MySQL, MongoDB, Cassandra and others. Testcontainers can be used in a Spring Boot test as follows: diff --git a/spring-boot-project/spring-boot-test/src/main/java/org/springframework/boot/test/context/SpringBootContextLoader.java b/spring-boot-project/spring-boot-test/src/main/java/org/springframework/boot/test/context/SpringBootContextLoader.java index c58f1bc4da2e..1f5108474d2f 100644 --- a/spring-boot-project/spring-boot-test/src/main/java/org/springframework/boot/test/context/SpringBootContextLoader.java +++ b/spring-boot-project/spring-boot-test/src/main/java/org/springframework/boot/test/context/SpringBootContextLoader.java @@ -141,7 +141,7 @@ private void assertHasClassesOrLocations(MergedContextConfiguration mergedConfig boolean hasClasses = !ObjectUtils.isEmpty(mergedConfig.getClasses()); boolean hasLocations = !ObjectUtils.isEmpty(mergedConfig.getLocations()); Assert.state(hasClasses || hasLocations, - () -> "No configuration classes or locations found in @SpringApplicationConfiguration. " + () -> "No configuration classes or locations are found in @SpringApplicationConfiguration. " + "For default configuration detection to work you need Spring 4.0.3 or better (found " + SpringVersion.getVersion() + ")."); } From eb78bb15036cb7b74f09c8363dfb56bf1f62901f Mon Sep 17 00:00:00 2001 From: "Khan, C M Abdullah" Date: Mon, 3 Jun 2024 00:13:24 +0600 Subject: [PATCH 2/2] Fix typos in method names and javadoc; update the documentation to ensure it is more understandable and coherent. - resolved feedbacks --- .../antora/modules/reference/pages/testing/testcontainers.adoc | 2 +- .../boot/test/context/SpringBootContextLoader.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/testing/testcontainers.adoc b/spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/testing/testcontainers.adoc index d134ed512629..90402c41135e 100644 --- a/spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/testing/testcontainers.adoc +++ b/spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/testing/testcontainers.adoc @@ -3,7 +3,7 @@ The https://www.testcontainers.org/[Testcontainers] library provides a way to manage services running inside Docker containers. It integrates with JUnit, allowing you to write a test class that can start up a container before any of the tests run. -Testcontainers are especially useful for writing integration tests that talk to a real backend service such as MySQL, MongoDB, Cassandra and others. +Testcontainers is especially useful for writing integration tests that talk to a real backend service such as MySQL, MongoDB, Cassandra and others. Testcontainers can be used in a Spring Boot test as follows: diff --git a/spring-boot-project/spring-boot-test/src/main/java/org/springframework/boot/test/context/SpringBootContextLoader.java b/spring-boot-project/spring-boot-test/src/main/java/org/springframework/boot/test/context/SpringBootContextLoader.java index 1f5108474d2f..c58f1bc4da2e 100644 --- a/spring-boot-project/spring-boot-test/src/main/java/org/springframework/boot/test/context/SpringBootContextLoader.java +++ b/spring-boot-project/spring-boot-test/src/main/java/org/springframework/boot/test/context/SpringBootContextLoader.java @@ -141,7 +141,7 @@ private void assertHasClassesOrLocations(MergedContextConfiguration mergedConfig boolean hasClasses = !ObjectUtils.isEmpty(mergedConfig.getClasses()); boolean hasLocations = !ObjectUtils.isEmpty(mergedConfig.getLocations()); Assert.state(hasClasses || hasLocations, - () -> "No configuration classes or locations are found in @SpringApplicationConfiguration. " + () -> "No configuration classes or locations found in @SpringApplicationConfiguration. " + "For default configuration detection to work you need Spring 4.0.3 or better (found " + SpringVersion.getVersion() + ")."); }