-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5d1f645
commit d662592
Showing
6 changed files
with
118 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
src/test/java/com/fasterxml/jackson/databind/deser/jdk/MapDeser2757Test.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
package com.fasterxml.jackson.databind.deser.jdk; | ||
|
||
import java.util.*; | ||
|
||
import com.fasterxml.jackson.databind.*; | ||
|
||
@SuppressWarnings("serial") | ||
public class MapDeser2757Test extends BaseMapTest | ||
{ | ||
static class MyMap extends LinkedHashMap<String, String> { | ||
public MyMap() { } | ||
|
||
public void setValue(StringWrapper w) { } | ||
public void setValue(IntWrapper w) { } | ||
|
||
public long getValue() { return 0L; } | ||
} | ||
|
||
// [databind#2757]: should allow deserialization as Map despite conflicting setters | ||
public void testCanDeserializeMap() throws Exception | ||
{ | ||
final ObjectMapper mapper = jsonMapperBuilder() | ||
.build(); | ||
|
||
MyMap input = new MyMap(); | ||
input.put("a", "b"); | ||
final String json = mapper.writeValueAsString(input); | ||
MyMap x = mapper.readValue(json, MyMap.class); | ||
assertEquals(1, x.size()); | ||
assertEquals("b", input.get("a")); | ||
} | ||
} |
53 changes: 0 additions & 53 deletions
53
src/test/java/com/fasterxml/jackson/failing/ObjectMapper2757Test.java
This file was deleted.
Oops, something went wrong.