From 3c76f81fe35903a008ad61180ab71243693e22ec Mon Sep 17 00:00:00 2001 From: Johnny Lim Date: Fri, 19 Apr 2024 23:32:19 +0900 Subject: [PATCH] Polish See gh-40449 --- .../saml2/Saml2RelyingPartyProperties.java | 3 ++ .../WebHttpHandlerBuilderCustomizer.java | 2 +- .../batch/BatchAutoConfigurationTests.java | 43 ++++--------------- .../spring-boot-dependencies/build.gradle | 2 +- ...DockerComposeConnectionDetailsFactory.java | 2 +- ...DockerComposeConnectionDetailsFactory.java | 2 +- 6 files changed, 16 insertions(+), 38 deletions(-) diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/security/saml2/Saml2RelyingPartyProperties.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/security/saml2/Saml2RelyingPartyProperties.java index f0f9f20c9d95..5b31dd9961d8 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/security/saml2/Saml2RelyingPartyProperties.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/security/saml2/Saml2RelyingPartyProperties.java @@ -73,6 +73,9 @@ public static class Registration { */ private final AssertingParty assertingparty = new AssertingParty(); + /** + * Name ID format for a relying party registration. + */ private String nameIdFormat; public String getEntityId() { diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/reactive/WebHttpHandlerBuilderCustomizer.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/reactive/WebHttpHandlerBuilderCustomizer.java index fcc755d8b181..b416e066c7c8 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/reactive/WebHttpHandlerBuilderCustomizer.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/reactive/WebHttpHandlerBuilderCustomizer.java @@ -29,7 +29,7 @@ public interface WebHttpHandlerBuilderCustomizer { /** * Callback to customize a {@link WebHttpHandlerBuilder} instance. - * @param webHttpHandlerBuilder the handlerBuilder to customize + * @param webHttpHandlerBuilder the {@link WebHttpHandlerBuilder} to customize */ void customize(WebHttpHandlerBuilder webHttpHandlerBuilder); diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/batch/BatchAutoConfigurationTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/batch/BatchAutoConfigurationTests.java index 6e8e604b5451..bf8bad0de84d 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/batch/BatchAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/batch/BatchAutoConfigurationTests.java @@ -84,10 +84,6 @@ import org.springframework.jdbc.datasource.init.DatabasePopulator; import org.springframework.orm.jpa.JpaTransactionManager; import org.springframework.transaction.PlatformTransactionManager; -import org.springframework.transaction.TransactionDefinition; -import org.springframework.transaction.TransactionException; -import org.springframework.transaction.support.AbstractPlatformTransactionManager; -import org.springframework.transaction.support.DefaultTransactionStatus; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; @@ -517,61 +513,40 @@ private Job mockJob(String name) { } @Configuration(proxyBeanMethods = false) - protected static class BatchDataSourceConfiguration { + static class BatchDataSourceConfiguration { @Bean @Primary - public DataSource normalDataSource() { + DataSource normalDataSource() { return DataSourceBuilder.create().url("jdbc:hsqldb:mem:normal").username("sa").build(); } @BatchDataSource @Bean - public DataSource batchDataSource() { + DataSource batchDataSource() { return DataSourceBuilder.create().url("jdbc:hsqldb:mem:batchdatasource").username("sa").build(); } } @Configuration(proxyBeanMethods = false) - protected static class BatchTransactionManagerConfiguration { + static class BatchTransactionManagerConfiguration { @Bean - public DataSource dataSource() { + DataSource dataSource() { return DataSourceBuilder.create().url("jdbc:hsqldb:mem:database").username("sa").build(); } @Bean @Primary - public PlatformTransactionManager normalTransactionManager() { - return new TestTransactionManager(); + PlatformTransactionManager normalTransactionManager() { + return mock(PlatformTransactionManager.class); } @BatchTransactionManager @Bean - public PlatformTransactionManager batchTransactionManager() { - return new TestTransactionManager(); - } - - } - - static class TestTransactionManager extends AbstractPlatformTransactionManager { - - @Override - protected Object doGetTransaction() throws TransactionException { - return null; - } - - @Override - protected void doBegin(Object transaction, TransactionDefinition definition) throws TransactionException { - } - - @Override - protected void doCommit(DefaultTransactionStatus status) throws TransactionException { - } - - @Override - protected void doRollback(DefaultTransactionStatus status) throws TransactionException { + PlatformTransactionManager batchTransactionManager() { + return mock(PlatformTransactionManager.class); } } diff --git a/spring-boot-project/spring-boot-dependencies/build.gradle b/spring-boot-project/spring-boot-dependencies/build.gradle index 7c2903353418..451c26cc5998 100644 --- a/spring-boot-project/spring-boot-dependencies/build.gradle +++ b/spring-boot-project/spring-boot-dependencies/build.gradle @@ -1455,7 +1455,7 @@ bom { library("Pulsar", "3.2.2") { group("org.apache.pulsar") { imports = [ - "pulsar-bom" + "pulsar-bom" ] } links { diff --git a/spring-boot-project/spring-boot-docker-compose/src/main/java/org/springframework/boot/docker/compose/service/connection/activemq/ActiveMQClassicDockerComposeConnectionDetailsFactory.java b/spring-boot-project/spring-boot-docker-compose/src/main/java/org/springframework/boot/docker/compose/service/connection/activemq/ActiveMQClassicDockerComposeConnectionDetailsFactory.java index 3442420bb62b..fa3603d1d00b 100644 --- a/spring-boot-project/spring-boot-docker-compose/src/main/java/org/springframework/boot/docker/compose/service/connection/activemq/ActiveMQClassicDockerComposeConnectionDetailsFactory.java +++ b/spring-boot-project/spring-boot-docker-compose/src/main/java/org/springframework/boot/docker/compose/service/connection/activemq/ActiveMQClassicDockerComposeConnectionDetailsFactory.java @@ -43,7 +43,7 @@ protected ActiveMQConnectionDetails getDockerComposeConnectionDetails(DockerComp } /** - * {@link ActiveMQConnectionDetails} backed by a {@code activemq} + * {@link ActiveMQConnectionDetails} backed by an {@code activemq} * {@link RunningService}. */ static class ActiveMQDockerComposeConnectionDetails extends DockerComposeConnectionDetails diff --git a/spring-boot-project/spring-boot-docker-compose/src/main/java/org/springframework/boot/docker/compose/service/connection/activemq/ActiveMQDockerComposeConnectionDetailsFactory.java b/spring-boot-project/spring-boot-docker-compose/src/main/java/org/springframework/boot/docker/compose/service/connection/activemq/ActiveMQDockerComposeConnectionDetailsFactory.java index 30597c45a8dd..0a8c42143856 100644 --- a/spring-boot-project/spring-boot-docker-compose/src/main/java/org/springframework/boot/docker/compose/service/connection/activemq/ActiveMQDockerComposeConnectionDetailsFactory.java +++ b/spring-boot-project/spring-boot-docker-compose/src/main/java/org/springframework/boot/docker/compose/service/connection/activemq/ActiveMQDockerComposeConnectionDetailsFactory.java @@ -42,7 +42,7 @@ protected ActiveMQConnectionDetails getDockerComposeConnectionDetails(DockerComp } /** - * {@link ActiveMQConnectionDetails} backed by a {@code activemq} + * {@link ActiveMQConnectionDetails} backed by an {@code activemq} * {@link RunningService}. */ static class ActiveMQDockerComposeConnectionDetails extends DockerComposeConnectionDetails