-
Notifications
You must be signed in to change notification settings - Fork 78
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
f78ae9f
commit a5334c8
Showing
7 changed files
with
54 additions
and
7 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
39 changes: 39 additions & 0 deletions
39
...va/com/fasterxml/jackson/module/afterburner/deser/GenericPropertyDeserializationTest.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,39 @@ | ||
package com.fasterxml.jackson.module.afterburner.deser; | ||
|
||
import com.fasterxml.jackson.databind.ObjectMapper; | ||
import com.fasterxml.jackson.module.afterburner.AfterburnerTestBase; | ||
|
||
public class GenericPropertyDeserializationTest extends AfterburnerTestBase | ||
{ | ||
static abstract class AbstractMyClass<ID> { | ||
private ID id; | ||
|
||
AbstractMyClass() { } | ||
|
||
public ID getId() { | ||
return id; | ||
} | ||
|
||
public void setId(ID id) { | ||
this.id = id; | ||
} | ||
} | ||
|
||
public static class MyClass extends AbstractMyClass<String> { | ||
public MyClass() { } | ||
} | ||
|
||
/* | ||
/********************************************************** | ||
/* Unit tests | ||
/********************************************************** | ||
*/ | ||
|
||
final private ObjectMapper MAPPER = mapperWithModule(); | ||
|
||
public void testGenericIssue4() throws Exception | ||
{ | ||
MyClass result = MAPPER.readValue("{\"id\":\"foo\"}", MyClass.class); | ||
assertEquals("foo", result.getId()); | ||
} | ||
} |
4 changes: 2 additions & 2 deletions
4
...burner/failing/GenericSerialize4Test.java → ...ser/GenericPropertySerializationTest.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
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