From b9e037b88f3a94367a8e8a42792d7e879b57a311 Mon Sep 17 00:00:00 2001 From: Phillip Webb Date: Fri, 4 Feb 2022 15:56:51 -0800 Subject: [PATCH 1/2] Polish --- .../boot/docs/cli/usingthecli/run/WebApplication.groovy | 2 +- .../multiple/CustomDependencyManagement.groovy | 4 ++-- .../single/CustomDependencyManagement.groovy | 4 ++-- .../testing/utilities/testresttemplate/MyTests.java | 4 ++-- .../docs/web/servlet/springmvc/json/MyJsonComponent.java | 6 ++---- 5 files changed, 9 insertions(+), 11 deletions(-) diff --git a/spring-boot-project/spring-boot-docs/src/main/groovy/org/springframework/boot/docs/cli/usingthecli/run/WebApplication.groovy b/spring-boot-project/spring-boot-docs/src/main/groovy/org/springframework/boot/docs/cli/usingthecli/run/WebApplication.groovy index d034a7c062..91154cc9a5 100644 --- a/spring-boot-project/spring-boot-docs/src/main/groovy/org/springframework/boot/docs/cli/usingthecli/run/WebApplication.groovy +++ b/spring-boot-project/spring-boot-docs/src/main/groovy/org/springframework/boot/docs/cli/usingthecli/run/WebApplication.groovy @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.docs.cli.usingthecli.run; +package org.springframework.boot.docs.cli.usingthecli.run import org.springframework.web.bind.annotation.RestController import org.springframework.web.bind.annotation.RequestMapping diff --git a/spring-boot-project/spring-boot-docs/src/main/groovy/org/springframework/boot/docs/cli/usingthecli/run/customdependencymanagement/multiple/CustomDependencyManagement.groovy b/spring-boot-project/spring-boot-docs/src/main/groovy/org/springframework/boot/docs/cli/usingthecli/run/customdependencymanagement/multiple/CustomDependencyManagement.groovy index 39d19a3c97..969e4f290c 100644 --- a/spring-boot-project/spring-boot-docs/src/main/groovy/org/springframework/boot/docs/cli/usingthecli/run/customdependencymanagement/multiple/CustomDependencyManagement.groovy +++ b/spring-boot-project/spring-boot-docs/src/main/groovy/org/springframework/boot/docs/cli/usingthecli/run/customdependencymanagement/multiple/CustomDependencyManagement.groovy @@ -14,9 +14,9 @@ * limitations under the License. */ -package org.springframework.boot.docs.cli.usingthecli.run.customdependencymanagement.multiple; +package org.springframework.boot.docs.cli.usingthecli.run.customdependencymanagement.multiple -import org.springframework.boot.groovy.DependencyManagementBom; +import org.springframework.boot.groovy.DependencyManagementBom // tag::code[] @DependencyManagementBom([ diff --git a/spring-boot-project/spring-boot-docs/src/main/groovy/org/springframework/boot/docs/cli/usingthecli/run/customdependencymanagement/single/CustomDependencyManagement.groovy b/spring-boot-project/spring-boot-docs/src/main/groovy/org/springframework/boot/docs/cli/usingthecli/run/customdependencymanagement/single/CustomDependencyManagement.groovy index 8184af3334..e8a3d81a62 100644 --- a/spring-boot-project/spring-boot-docs/src/main/groovy/org/springframework/boot/docs/cli/usingthecli/run/customdependencymanagement/single/CustomDependencyManagement.groovy +++ b/spring-boot-project/spring-boot-docs/src/main/groovy/org/springframework/boot/docs/cli/usingthecli/run/customdependencymanagement/single/CustomDependencyManagement.groovy @@ -14,9 +14,9 @@ * limitations under the License. */ -package org.springframework.boot.docs.cli.usingthecli.run.customdependencymanagement.single; +package org.springframework.boot.docs.cli.usingthecli.run.customdependencymanagement.single -import org.springframework.boot.groovy.DependencyManagementBom; +import org.springframework.boot.groovy.DependencyManagementBom // tag::code[] @DependencyManagementBom("com.example.custom-bom:1.0.0") diff --git a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/utilities/testresttemplate/MyTests.java b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/utilities/testresttemplate/MyTests.java index 04c9210217..112c86cc76 100644 --- a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/utilities/testresttemplate/MyTests.java +++ b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/utilities/testresttemplate/MyTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2021 the original author or authors. + * Copyright 2012-2022 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -25,7 +25,7 @@ import static org.assertj.core.api.Assertions.assertThat; class MyTests { - private TestRestTemplate template = new TestRestTemplate(); + private final TestRestTemplate template = new TestRestTemplate(); @Test void testRequest() throws Exception { diff --git a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/web/servlet/springmvc/json/MyJsonComponent.java b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/web/servlet/springmvc/json/MyJsonComponent.java index 659edbfa17..ad2c98dfd9 100644 --- a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/web/servlet/springmvc/json/MyJsonComponent.java +++ b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/web/servlet/springmvc/json/MyJsonComponent.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2021 the original author or authors. + * Copyright 2012-2022 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,7 +20,6 @@ import java.io.IOException; import com.fasterxml.jackson.core.JsonGenerator; import com.fasterxml.jackson.core.JsonParser; -import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.core.ObjectCodec; import com.fasterxml.jackson.databind.DeserializationContext; import com.fasterxml.jackson.databind.JsonDeserializer; @@ -46,8 +45,7 @@ public class MyJsonComponent { public static class Deserializer extends JsonDeserializer { @Override - public MyObject deserialize(JsonParser jsonParser, DeserializationContext ctxt) - throws IOException, JsonProcessingException { + public MyObject deserialize(JsonParser jsonParser, DeserializationContext ctxt) throws IOException { ObjectCodec codec = jsonParser.getCodec(); JsonNode tree = codec.readTree(jsonParser); String name = tree.get("name").textValue(); From 6c74e241475bdfa8e6cf85868dfa34e1cde45dd4 Mon Sep 17 00:00:00 2001 From: Phillip Webb Date: Fri, 4 Feb 2022 16:09:35 -0800 Subject: [PATCH 2/2] Update copyright year of changed files --- .../java/org/springframework/boot/build/KotlinConventions.java | 2 +- .../boot/autoconfigure/graphql/GraphQlCorsProperties.java | 2 +- .../autoconfigure/graphql/GraphQlSourceBuilderCustomizer.java | 2 +- .../configurationmetadata/format/property/MyProperties.java | 2 +- .../jpaandspringdata/enversrepositories/CountryRepository.java | 2 +- .../validation/MyProperties.java | 2 +- .../validation/nested/MyProperties.java | 2 +- .../springgraphqltests/GreetingControllerTests.java | 2 +- .../boot/docs/using/devtools/restart/disable/MyApplication.java | 2 +- .../boot/docs/web/graphql/runtimewiring/GreetingController.java | 2 +- .../web/security/oauth2/client/MyOAuthClientConfiguration.java | 2 +- .../security/springwebflux/MyWebFluxSecurityConfiguration.java | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-) diff --git a/buildSrc/src/main/java/org/springframework/boot/build/KotlinConventions.java b/buildSrc/src/main/java/org/springframework/boot/build/KotlinConventions.java index 43fce7c5cc..cdf7708ca4 100644 --- a/buildSrc/src/main/java/org/springframework/boot/build/KotlinConventions.java +++ b/buildSrc/src/main/java/org/springframework/boot/build/KotlinConventions.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2021 the original author or authors. + * Copyright 2012-2022 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/graphql/GraphQlCorsProperties.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/graphql/GraphQlCorsProperties.java index 57748d28b1..7611f4e3ee 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/graphql/GraphQlCorsProperties.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/graphql/GraphQlCorsProperties.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2021 the original author or authors. + * Copyright 2012-2022 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/graphql/GraphQlSourceBuilderCustomizer.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/graphql/GraphQlSourceBuilderCustomizer.java index 9ee6c66e98..0310679b73 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/graphql/GraphQlSourceBuilderCustomizer.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/graphql/GraphQlSourceBuilderCustomizer.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2021 the original author or authors. + * Copyright 2012-2022 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/configurationmetadata/format/property/MyProperties.java b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/configurationmetadata/format/property/MyProperties.java index 3cfd108a72..dbf9c5f2e8 100644 --- a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/configurationmetadata/format/property/MyProperties.java +++ b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/configurationmetadata/format/property/MyProperties.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2021 the original author or authors. + * Copyright 2012-2022 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/data/sql/jpaandspringdata/enversrepositories/CountryRepository.java b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/data/sql/jpaandspringdata/enversrepositories/CountryRepository.java index 01a10a651a..40c8aa8f60 100644 --- a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/data/sql/jpaandspringdata/enversrepositories/CountryRepository.java +++ b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/data/sql/jpaandspringdata/enversrepositories/CountryRepository.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2021 the original author or authors. + * Copyright 2012-2022 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/externalconfig/typesafeconfigurationproperties/validation/MyProperties.java b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/externalconfig/typesafeconfigurationproperties/validation/MyProperties.java index 50df92cf8f..f670df07ad 100644 --- a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/externalconfig/typesafeconfigurationproperties/validation/MyProperties.java +++ b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/externalconfig/typesafeconfigurationproperties/validation/MyProperties.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2021 the original author or authors. + * Copyright 2012-2022 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/externalconfig/typesafeconfigurationproperties/validation/nested/MyProperties.java b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/externalconfig/typesafeconfigurationproperties/validation/nested/MyProperties.java index 0f4e421856..faed570093 100644 --- a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/externalconfig/typesafeconfigurationproperties/validation/nested/MyProperties.java +++ b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/externalconfig/typesafeconfigurationproperties/validation/nested/MyProperties.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2021 the original author or authors. + * Copyright 2012-2022 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/springgraphqltests/GreetingControllerTests.java b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/springgraphqltests/GreetingControllerTests.java index e798e73df3..932003390b 100644 --- a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/springgraphqltests/GreetingControllerTests.java +++ b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/springgraphqltests/GreetingControllerTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2021 the original author or authors. + * Copyright 2012-2022 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/using/devtools/restart/disable/MyApplication.java b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/using/devtools/restart/disable/MyApplication.java index cdfadc6ed4..dfa172fe45 100644 --- a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/using/devtools/restart/disable/MyApplication.java +++ b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/using/devtools/restart/disable/MyApplication.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2021 the original author or authors. + * Copyright 2012-2022 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/web/graphql/runtimewiring/GreetingController.java b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/web/graphql/runtimewiring/GreetingController.java index 8e720a89a8..b25af8d050 100644 --- a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/web/graphql/runtimewiring/GreetingController.java +++ b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/web/graphql/runtimewiring/GreetingController.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2021 the original author or authors. + * Copyright 2002-2022 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/web/security/oauth2/client/MyOAuthClientConfiguration.java b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/web/security/oauth2/client/MyOAuthClientConfiguration.java index 335e8a1313..bf3ad89037 100644 --- a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/web/security/oauth2/client/MyOAuthClientConfiguration.java +++ b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/web/security/oauth2/client/MyOAuthClientConfiguration.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2021 the original author or authors. + * Copyright 2012-2022 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/web/security/springwebflux/MyWebFluxSecurityConfiguration.java b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/web/security/springwebflux/MyWebFluxSecurityConfiguration.java index f5429b6511..6e71aadd7f 100644 --- a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/web/security/springwebflux/MyWebFluxSecurityConfiguration.java +++ b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/web/security/springwebflux/MyWebFluxSecurityConfiguration.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2021 the original author or authors. + * Copyright 2012-2022 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License.