1
1
package com .fasterxml .jackson .dataformat .xml .failing ;
2
2
3
- import java .util .ArrayList ;
3
+ import java .util .List ;
4
4
5
5
import com .fasterxml .jackson .annotation .JsonIgnoreProperties ;
6
6
@@ -18,16 +18,31 @@ static class Depots273
18
18
public String taskId ;
19
19
20
20
@ JacksonXmlElementWrapper (useWrapping = false )
21
- public ArrayList <Depot273 > element ;
21
+ public List <Depot273 > element ;
22
+
23
+ public void setElement (List <Depot273 > l ) {
24
+ //System.err.println("setElement: "+l);
25
+ element = l ;
26
+ }
22
27
}
23
28
24
29
@ JsonIgnoreProperties (ignoreUnknown = true )
25
30
static class Depot273
26
31
{
27
32
@ JacksonXmlProperty (isAttribute = true )
28
33
public String number ;
34
+
29
35
@ JacksonXmlProperty (isAttribute = true )
30
36
public String name ;
37
+
38
+ public void setNumber (String n ) {
39
+ //System.err.println("SetNumber: '"+n+"'");
40
+ number = n ;
41
+ }
42
+ public void setName (String n ) {
43
+ //System.err.println("setName: '"+n+"'");
44
+ name = n ;
45
+ }
31
46
}
32
47
33
48
/*
@@ -43,14 +58,14 @@ static class Depot273
43
58
public void testCaseInsensitiveComplex () throws Exception
44
59
{
45
60
final String DOC =
46
- "<AcResponse Command='show depots' TaskId='1260'>\n " +
61
+ "<Depots273 Command='show depots' TaskId='1260'>\n " +
47
62
" <Element Number='1' Name='accurev' Slice='1'\n " +
48
63
"exclusiveLocking='false' case='insensitive' locWidth='128'" +
49
64
"></Element>\n " +
50
65
" <Element Number='2' Name='second accurev' Slice='2'\n " +
51
66
"exclusiveLocking='false' case='insensitive' locWidth='128'\n " +
52
67
"></Element>\n " +
53
- "</AcResponse >"
68
+ "</Depots273 >"
54
69
;
55
70
56
71
Depots273 result = INSENSITIVE_MAPPER .readValue (DOC , Depots273 .class );
0 commit comments