diff --git a/.mvn/wrapper/maven-wrapper.properties b/.mvn/wrapper/maven-wrapper.properties index a36fc474..71952c45 100644 --- a/.mvn/wrapper/maven-wrapper.properties +++ b/.mvn/wrapper/maven-wrapper.properties @@ -14,5 +14,5 @@ # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. -distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.2/apache-maven-3.9.2-bin.zip +distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.3/apache-maven-3.9.3-bin.zip wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar diff --git a/release-notes/VERSION-2.x b/release-notes/VERSION-2.x index 3dbdcdde..732e13e5 100644 --- a/release-notes/VERSION-2.x +++ b/release-notes/VERSION-2.x @@ -13,7 +13,8 @@ NOTE: Annotations module will never contain changes in patch versions, 2.17.0 (not yet released) -- +#242: Allow `@JsonAnySetter` on `ElementType.PARAMETER` (for use on + constructor parameter) 2.16.0 (15-Nov-2023) diff --git a/src/main/java/com/fasterxml/jackson/annotation/JsonAnySetter.java b/src/main/java/com/fasterxml/jackson/annotation/JsonAnySetter.java index 50b11de3..49472a3a 100644 --- a/src/main/java/com/fasterxml/jackson/annotation/JsonAnySetter.java +++ b/src/main/java/com/fasterxml/jackson/annotation/JsonAnySetter.java @@ -19,10 +19,12 @@ * If used, all otherwise unmapped key-value pairs from JSON Object values * are added using mutator. *

- * NOTE: ability to annotated fields was added in version 2.8; earlier only + * NOTE: ability to annotate fields was added in version 2.8; earlier only * methods could be annotated. + *

+ * NOTE: ability to annotate (constructor) parameters was added in version 2.17. */ -@Target({ElementType.ANNOTATION_TYPE, ElementType.METHOD, ElementType.FIELD}) +@Target({ElementType.ANNOTATION_TYPE, ElementType.METHOD, ElementType.FIELD, ElementType.PARAMETER}) @Retention(RetentionPolicy.RUNTIME) @JacksonAnnotation public @interface JsonAnySetter