@@ -30,30 +30,16 @@ static class ArrayListBean extends BaseListBean
30
30
public void setList (ArrayList <String > l ) { super .setList (l ); }
31
31
}
32
32
33
- // 27-Feb-2010, tatus: Won't fix immediately, need to comment out
34
- /*
35
- static class OverloadBean
36
- {
37
- String a;
38
-
39
- public OverloadBean() { }
40
-
41
- public void setA(int value) { a = String.valueOf(value); }
42
- public void setA(String value) { a = value; }
43
- }
44
- */
45
-
46
33
static class NumberBean {
47
- protected Object value ;
48
-
49
- public void setValue (Number n ) { value = n ; }
34
+ protected Object value ;
35
+
36
+ public void setValue (Number n ) { value = n ; }
50
37
}
51
38
52
39
static class WasNumberBean extends NumberBean {
53
- public void setValue (String str ) { value = str ; }
40
+ public void setValue (String str ) { value = str ; }
54
41
}
55
42
56
- // [JACKSON-739]
57
43
static class Overloaded739
58
44
{
59
45
protected Object _value ;
@@ -69,35 +55,17 @@ static class Overloaded739
69
55
* And then a Bean that is conflicting and should not work
70
56
*/
71
57
static class ConflictBean {
72
- public void setA (ArrayList <Object > a ) { }
73
- public void setA (LinkedList <Object > a ) { }
58
+ public void setA (ArrayList <Object > a ) { }
59
+ public void setA (LinkedList <Object > a ) { }
74
60
}
75
-
61
+
76
62
/*
77
63
/************************************************************
78
64
/* Unit tests, valid
79
65
/************************************************************
80
66
*/
81
67
82
- private final ObjectMapper MAPPER = new ObjectMapper ();
83
-
84
- /**
85
- * Unit test related to [JACKSON-189]
86
- */
87
- // 27-Feb-2010, tatus: Won't fix immediately, need to comment out
88
- /*
89
- public void testSimpleOverload() throws Exception
90
- {
91
- OverloadBean bean;
92
- try {
93
- bean = new ObjectMapper().readValue("{ \"a\" : 13 }", OverloadBean.class);
94
- } catch (JsonMappingException e) {
95
- fail("Did not expect an exception, got: "+e.getMessage());
96
- return;
97
- }
98
- assertEquals("13", bean.a);
99
- }
100
- */
68
+ private final ObjectMapper MAPPER = newJsonMapper ();
101
69
102
70
/**
103
71
* It should be ok to overload with specialized
0 commit comments