Skip to content

Commit 62aac6b

Browse files
committed
Move #4316 testing to non-failing now that it passes
1 parent 5e0d7f8 commit 62aac6b

File tree

2 files changed

+20
-31
lines changed

2 files changed

+20
-31
lines changed

src/test/java/com/fasterxml/jackson/databind/deser/AnySetterTest.java

+20
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,15 @@ static class IdentityDTO349 {
255255
public int x, y;
256256
}
257257

258+
// [databind#4316]
259+
static class Problem4316 extends Exception {
260+
private static final long serialVersionUID = 1L;
261+
262+
@JsonAnySetter
263+
@JsonAnyGetter
264+
Map<String, Object> additionalProperties = new HashMap<>();
265+
}
266+
258267
/*
259268
/**********************************************************
260269
/* Test methods
@@ -466,6 +475,17 @@ public void testGenericAnySetter() throws Exception
466475
assertEquals(integerGeneric.getDynamicallyMappedProperties(), integerGenericMap);
467476
}
468477

478+
// [databind#4316]
479+
public void testWithAnySetter() throws Exception
480+
{
481+
Problem4316 problem = new Problem4316();
482+
problem.additionalProperties.put("key", "value");
483+
String json = MAPPER.writeValueAsString(problem);
484+
Problem4316 result = MAPPER.readValue(json, Problem4316.class);
485+
assertEquals(Collections.singletonMap("key", "value"),
486+
result.additionalProperties);
487+
}
488+
469489
/*
470490
/**********************************************************
471491
/* Private helper methods

src/test/java/com/fasterxml/jackson/failing/ExceptionWithAnySetter4316Test.java

-31
This file was deleted.

0 commit comments

Comments
 (0)