File tree Expand file tree Collapse file tree 2 files changed +41
-0
lines changed
src/test/java/com/fasterxml/jackson/failing Expand file tree Collapse file tree 2 files changed +41
-0
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ Project: jackson-databind
10
10
#1675 : Remove " impossible" `IOException` in `readTree()` and `readValue()` `ObjectMapper`
11
11
methods which accept Strings
12
12
(requested by matthew-pwnieexpress@github)
13
+ #1995 : Limit size of `DeserializerCache`, auto -flush on exceeding
13
14
#2059 : Remove `final ` modifier for `TypeFactory`
14
15
(requested by Thibaut R)
15
16
#2115 : Support naive deserialization of `Serializable` values as " untyped" , same
Original file line number Diff line number Diff line change
1
+ package com .fasterxml .jackson .failing ;
2
+
3
+ import java .io .Serializable ;
4
+ import java .util .ArrayList ;
5
+ import java .util .List ;
6
+
7
+ import com .fasterxml .jackson .databind .*;
8
+
9
+ // [databind#2331]
10
+ public class GenericNestedType2331Test extends BaseMapTest
11
+ {
12
+ static class SuperNode <T > { }
13
+ static class SuperTestClass { }
14
+
15
+ static class Node <T extends SuperTestClass & Cloneable > extends SuperNode <Node <T >> implements Serializable {
16
+
17
+ public List <Node <T >> children ;
18
+
19
+ public Node () {
20
+ children = new ArrayList <Node <T >>();
21
+ }
22
+
23
+ /**
24
+ * The Wildcard here seems to be the Issue.
25
+ * If we remove this full getter, everything is working as expected.
26
+ * @return
27
+ */
28
+ public List <? extends SuperNode <Node <T >>> getChildren () {
29
+ return children ;
30
+ }
31
+ }
32
+
33
+ public void testGeneric2331 () throws Exception {
34
+ Node root = new Node ();
35
+ root .children .add (new Node ());
36
+
37
+ String json = newObjectMapper ().writeValueAsString (root );
38
+ assertNotNull (json );
39
+ }
40
+ }
You can’t perform that action at this time.
0 commit comments