From 7fb5369fa39b8c40f0cfa284ed5a87bb47a980c4 Mon Sep 17 00:00:00 2001 From: Johnny Lim Date: Thu, 24 Jul 2025 21:46:10 +0900 Subject: [PATCH 1/2] Use "2012-present" for copyright headers Signed-off-by: Johnny Lim --- .../AbstractMongoContainerConnectionDetailsFactory.java | 2 +- .../MongoDbAtlasLocalContainerConnectionDetailsFactory.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/module/spring-boot-mongodb/src/main/java/org/springframework/boot/mongodb/testcontainers/AbstractMongoContainerConnectionDetailsFactory.java b/module/spring-boot-mongodb/src/main/java/org/springframework/boot/mongodb/testcontainers/AbstractMongoContainerConnectionDetailsFactory.java index b5883a06c54a..87226e5c8675 100644 --- a/module/spring-boot-mongodb/src/main/java/org/springframework/boot/mongodb/testcontainers/AbstractMongoContainerConnectionDetailsFactory.java +++ b/module/spring-boot-mongodb/src/main/java/org/springframework/boot/mongodb/testcontainers/AbstractMongoContainerConnectionDetailsFactory.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2025 the original author or authors. + * Copyright 2012-present 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/module/spring-boot-mongodb/src/main/java/org/springframework/boot/mongodb/testcontainers/MongoDbAtlasLocalContainerConnectionDetailsFactory.java b/module/spring-boot-mongodb/src/main/java/org/springframework/boot/mongodb/testcontainers/MongoDbAtlasLocalContainerConnectionDetailsFactory.java index b2b965b243a0..2a4b1884d5a7 100644 --- a/module/spring-boot-mongodb/src/main/java/org/springframework/boot/mongodb/testcontainers/MongoDbAtlasLocalContainerConnectionDetailsFactory.java +++ b/module/spring-boot-mongodb/src/main/java/org/springframework/boot/mongodb/testcontainers/MongoDbAtlasLocalContainerConnectionDetailsFactory.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2025 the original author or authors. + * Copyright 2012-present 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. From c260e4b6884e772770dc07cb2d6c7f9503751e20 Mon Sep 17 00:00:00 2001 From: Johnny Lim Date: Fri, 25 Jul 2025 00:34:31 +0900 Subject: [PATCH 2/2] Add SpringHeaderCheck to enforce using "2012-present" This commit also fixes copyright headers that don't follow it. Signed-off-by: Johnny Lim --- config/checkstyle/checkstyle.xml | 3 +++ .../boot/context/metrics/buffering/BufferedStartupStep.java | 2 +- .../context/metrics/buffering/BufferingApplicationStartup.java | 2 +- .../boot/context/metrics/buffering/StartupTimeline.java | 2 +- .../boot/context/properties/ConstructorBound.java | 2 +- .../java/org/springframework/boot/convert/PeriodStyle.java | 2 +- .../springframework/boot/convert/PeriodToStringConverter.java | 2 +- .../docs/web/graphql/runtimewiring/GreetingController.java | 2 +- 8 files changed, 10 insertions(+), 7 deletions(-) diff --git a/config/checkstyle/checkstyle.xml b/config/checkstyle/checkstyle.xml index 3142d702fa6c..ae5dea7a02c5 100644 --- a/config/checkstyle/checkstyle.xml +++ b/config/checkstyle/checkstyle.xml @@ -7,6 +7,9 @@ + + + diff --git a/core/spring-boot/src/main/java/org/springframework/boot/context/metrics/buffering/BufferedStartupStep.java b/core/spring-boot/src/main/java/org/springframework/boot/context/metrics/buffering/BufferedStartupStep.java index 4903873ef376..36748a24d7de 100644 --- a/core/spring-boot/src/main/java/org/springframework/boot/context/metrics/buffering/BufferedStartupStep.java +++ b/core/spring-boot/src/main/java/org/springframework/boot/context/metrics/buffering/BufferedStartupStep.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-present the original author or authors. + * Copyright 2012-present 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/core/spring-boot/src/main/java/org/springframework/boot/context/metrics/buffering/BufferingApplicationStartup.java b/core/spring-boot/src/main/java/org/springframework/boot/context/metrics/buffering/BufferingApplicationStartup.java index 4812604d5fb0..cc8cccca6962 100644 --- a/core/spring-boot/src/main/java/org/springframework/boot/context/metrics/buffering/BufferingApplicationStartup.java +++ b/core/spring-boot/src/main/java/org/springframework/boot/context/metrics/buffering/BufferingApplicationStartup.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-present the original author or authors. + * Copyright 2012-present 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/core/spring-boot/src/main/java/org/springframework/boot/context/metrics/buffering/StartupTimeline.java b/core/spring-boot/src/main/java/org/springframework/boot/context/metrics/buffering/StartupTimeline.java index de36a6312ebd..20f67bcf41ba 100644 --- a/core/spring-boot/src/main/java/org/springframework/boot/context/metrics/buffering/StartupTimeline.java +++ b/core/spring-boot/src/main/java/org/springframework/boot/context/metrics/buffering/StartupTimeline.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-present the original author or authors. + * Copyright 2012-present 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/core/spring-boot/src/main/java/org/springframework/boot/context/properties/ConstructorBound.java b/core/spring-boot/src/main/java/org/springframework/boot/context/properties/ConstructorBound.java index 2ba6f21d75bf..36c2063ea527 100644 --- a/core/spring-boot/src/main/java/org/springframework/boot/context/properties/ConstructorBound.java +++ b/core/spring-boot/src/main/java/org/springframework/boot/context/properties/ConstructorBound.java @@ -1,5 +1,5 @@ /* - * Copyright 2019-present the original author or authors. + * Copyright 2012-present 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/core/spring-boot/src/main/java/org/springframework/boot/convert/PeriodStyle.java b/core/spring-boot/src/main/java/org/springframework/boot/convert/PeriodStyle.java index 4ec53157e827..783d28914353 100644 --- a/core/spring-boot/src/main/java/org/springframework/boot/convert/PeriodStyle.java +++ b/core/spring-boot/src/main/java/org/springframework/boot/convert/PeriodStyle.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-present the original author or authors. + * Copyright 2012-present 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/core/spring-boot/src/main/java/org/springframework/boot/convert/PeriodToStringConverter.java b/core/spring-boot/src/main/java/org/springframework/boot/convert/PeriodToStringConverter.java index b285d6911d69..dd8eac021223 100644 --- a/core/spring-boot/src/main/java/org/springframework/boot/convert/PeriodToStringConverter.java +++ b/core/spring-boot/src/main/java/org/springframework/boot/convert/PeriodToStringConverter.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-present the original author or authors. + * Copyright 2012-present 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/documentation/spring-boot-docs/src/main/java/org/springframework/boot/docs/web/graphql/runtimewiring/GreetingController.java b/documentation/spring-boot-docs/src/main/java/org/springframework/boot/docs/web/graphql/runtimewiring/GreetingController.java index 698ab840457d..0e5b61be63dd 100644 --- a/documentation/spring-boot-docs/src/main/java/org/springframework/boot/docs/web/graphql/runtimewiring/GreetingController.java +++ b/documentation/spring-boot-docs/src/main/java/org/springframework/boot/docs/web/graphql/runtimewiring/GreetingController.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-present the original author or authors. + * Copyright 2012-present 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.