Skip to content

Commit 622fd4c

Browse files
committed
Fix #242: allow @JsonAnySetter on parameters
1 parent e3f7e0d commit 622fd4c

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

.mvn/wrapper/maven-wrapper.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,5 @@
1414
# KIND, either express or implied. See the License for the
1515
# specific language governing permissions and limitations
1616
# under the License.
17-
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.2/apache-maven-3.9.2-bin.zip
17+
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.3/apache-maven-3.9.3-bin.zip
1818
wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar

release-notes/VERSION-2.x

+2-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ NOTE: Annotations module will never contain changes in patch versions,
1313

1414
2.17.0 (not yet released)
1515

16-
-
16+
#242: Allow `@JsonAnySetter` on `ElementType.PARAMETER` (for use on
17+
constructor parameter)
1718

1819
2.16.0 (15-Nov-2023)
1920

src/main/java/com/fasterxml/jackson/annotation/JsonAnySetter.java

+4-2
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,12 @@
1919
* If used, all otherwise unmapped key-value pairs from JSON Object values
2020
* are added using mutator.
2121
*<p>
22-
* NOTE: ability to annotated fields was added in version 2.8; earlier only
22+
* NOTE: ability to annotate fields was added in version 2.8; earlier only
2323
* methods could be annotated.
24+
*<p>
25+
* NOTE: ability to annotate (constructor) parameters was added in version 2.17.
2426
*/
25-
@Target({ElementType.ANNOTATION_TYPE, ElementType.METHOD, ElementType.FIELD})
27+
@Target({ElementType.ANNOTATION_TYPE, ElementType.METHOD, ElementType.FIELD, ElementType.PARAMETER})
2628
@Retention(RetentionPolicy.RUNTIME)
2729
@JacksonAnnotation
2830
public @interface JsonAnySetter

0 commit comments

Comments
 (0)