From 28bbb3ee10d0405921e45b2a5e77c85240f80d6a Mon Sep 17 00:00:00 2001 From: Tran Ngoc Nhan Date: Thu, 3 Apr 2025 00:53:04 +0700 Subject: [PATCH] Remove RECORD_COMPONENT target from @DefaultValue See gh-44984 Signed-off-by: Tran Ngoc Nhan --- .../boot/configurationsample/DefaultValue.java | 4 ++-- .../boot/context/properties/bind/DefaultValue.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/spring-boot-project/spring-boot-tools/spring-boot-configuration-processor/src/test/java/org/springframework/boot/configurationsample/DefaultValue.java b/spring-boot-project/spring-boot-tools/spring-boot-configuration-processor/src/test/java/org/springframework/boot/configurationsample/DefaultValue.java index 071e8a20ce2..56e813df83a 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-configuration-processor/src/test/java/org/springframework/boot/configurationsample/DefaultValue.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-configuration-processor/src/test/java/org/springframework/boot/configurationsample/DefaultValue.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2022 the original author or authors. + * Copyright 2012-2025 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. @@ -29,7 +29,7 @@ import java.lang.annotation.Target; * @author Stephane Nicoll * @author Pavel Anisimov */ -@Target({ ElementType.PARAMETER, ElementType.RECORD_COMPONENT }) +@Target({ ElementType.PARAMETER }) @Retention(RetentionPolicy.RUNTIME) @Documented public @interface DefaultValue { diff --git a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/properties/bind/DefaultValue.java b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/properties/bind/DefaultValue.java index 8d4f15e391d..774fdf6aac9 100644 --- a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/properties/bind/DefaultValue.java +++ b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/properties/bind/DefaultValue.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2022 the original author or authors. + * Copyright 2012-2025 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. @@ -41,7 +41,7 @@ import java.lang.annotation.Target; * @since 2.2.0 */ @Retention(RetentionPolicy.RUNTIME) -@Target({ ElementType.PARAMETER, ElementType.RECORD_COMPONENT }) +@Target({ ElementType.PARAMETER }) @Documented public @interface DefaultValue {