From ff6ecef762ea4f1feab531744dd02a596b2197fb Mon Sep 17 00:00:00 2001 From: zhangliang Date: Fri, 13 Oct 2023 19:40:56 +0800 Subject: [PATCH] Add spotless --- .../handler/general/IgnoreJobErrorHandlerTest.java | 4 ++-- .../infra/spi/ElasticJobServiceLoaderTest.java | 12 ++++++------ pom.xml | 4 ++-- src/{main => }/resources/checkstyle.xml | 0 src/{main => }/resources/checkstyle_ci.xml | 0 5 files changed, 10 insertions(+), 10 deletions(-) rename src/{main => }/resources/checkstyle.xml (100%) rename src/{main => }/resources/checkstyle_ci.xml (100%) diff --git a/elasticjob-ecosystem/elasticjob-error-handler/elasticjob-error-handler-type/elasticjob-error-handler-general/src/test/java/org/apache/shardingsphere/elasticjob/error/handler/general/IgnoreJobErrorHandlerTest.java b/elasticjob-ecosystem/elasticjob-error-handler/elasticjob-error-handler-type/elasticjob-error-handler-general/src/test/java/org/apache/shardingsphere/elasticjob/error/handler/general/IgnoreJobErrorHandlerTest.java index 67159c9c50..054ec2437c 100644 --- a/elasticjob-ecosystem/elasticjob-error-handler/elasticjob-error-handler-type/elasticjob-error-handler-general/src/test/java/org/apache/shardingsphere/elasticjob/error/handler/general/IgnoreJobErrorHandlerTest.java +++ b/elasticjob-ecosystem/elasticjob-error-handler/elasticjob-error-handler-type/elasticjob-error-handler-general/src/test/java/org/apache/shardingsphere/elasticjob/error/handler/general/IgnoreJobErrorHandlerTest.java @@ -27,7 +27,7 @@ public final class IgnoreJobErrorHandlerTest { @Test public void assertHandleException() { - JobErrorHandlerFactory.createHandler("IGNORE", new Properties()).orElseThrow( - () -> new JobConfigurationException("IGNORE error handler not found.")).handleException("test_job", new RuntimeException("test")); + JobErrorHandlerFactory.createHandler("IGNORE", new Properties()) + .orElseThrow(() -> new JobConfigurationException("IGNORE error handler not found.")).handleException("test_job", new RuntimeException("test")); } } diff --git a/elasticjob-infra/elasticjob-infra-common/src/test/java/org/apache/shardingsphere/elasticjob/infra/spi/ElasticJobServiceLoaderTest.java b/elasticjob-infra/elasticjob-infra-common/src/test/java/org/apache/shardingsphere/elasticjob/infra/spi/ElasticJobServiceLoaderTest.java index 245e2c6e3d..350ce60876 100644 --- a/elasticjob-infra/elasticjob-infra-common/src/test/java/org/apache/shardingsphere/elasticjob/infra/spi/ElasticJobServiceLoaderTest.java +++ b/elasticjob-infra/elasticjob-infra-common/src/test/java/org/apache/shardingsphere/elasticjob/infra/spi/ElasticJobServiceLoaderTest.java @@ -47,14 +47,14 @@ public void assertNewTypedServiceInstance() { @Test public void assertGetCacheTypedServiceFailureWithUnRegisteredServiceInterface() { - Assertions.assertThrows(IllegalArgumentException.class, - () -> ElasticJobServiceLoader.getCachedTypedServiceInstance(UnRegisteredTypedFooService.class, "unRegisteredTypedFooServiceImpl").orElseThrow(IllegalArgumentException::new)); + Assertions.assertThrows(IllegalArgumentException.class, () -> ElasticJobServiceLoader.getCachedTypedServiceInstance( + UnRegisteredTypedFooService.class, "unRegisteredTypedFooServiceImpl").orElseThrow(IllegalArgumentException::new)); } @Test public void assertGetCacheTypedServiceFailureWithInvalidType() { - Assertions.assertThrows(IllegalArgumentException.class, - () -> ElasticJobServiceLoader.getCachedTypedServiceInstance(TypedFooService.class, "INVALID").orElseThrow(IllegalArgumentException::new)); + Assertions.assertThrows(IllegalArgumentException.class, () -> ElasticJobServiceLoader.getCachedTypedServiceInstance( + TypedFooService.class, "INVALID").orElseThrow(IllegalArgumentException::new)); } @Test @@ -65,7 +65,7 @@ public void assertNewTypedServiceInstanceFailureWithUnRegisteredServiceInterface @Test public void assertNewTypedServiceInstanceFailureWithInvalidType() { - Assertions.assertThrows(IllegalArgumentException.class, - () -> ElasticJobServiceLoader.newTypedServiceInstance(TypedFooService.class, "INVALID", new Properties()).orElseThrow(IllegalArgumentException::new)); + Assertions.assertThrows(IllegalArgumentException.class, () -> ElasticJobServiceLoader.newTypedServiceInstance( + TypedFooService.class, "INVALID", new Properties()).orElseThrow(IllegalArgumentException::new)); } } diff --git a/pom.xml b/pom.xml index 140bd869e5..ddaa658283 100644 --- a/pom.xml +++ b/pom.xml @@ -624,7 +624,7 @@ maven-checkstyle-plugin ${maven-checkstyle-plugin.version} - src/main/resources/checkstyle_ci.xml + src/resources/checkstyle_ci.xml true @@ -799,7 +799,7 @@ maven-checkstyle-plugin ${maven-checkstyle-plugin.version} - src/main/resources/checkstyle.xml + src/resources/checkstyle.xml true diff --git a/src/main/resources/checkstyle.xml b/src/resources/checkstyle.xml similarity index 100% rename from src/main/resources/checkstyle.xml rename to src/resources/checkstyle.xml diff --git a/src/main/resources/checkstyle_ci.xml b/src/resources/checkstyle_ci.xml similarity index 100% rename from src/main/resources/checkstyle_ci.xml rename to src/resources/checkstyle_ci.xml