@@ -83,7 +83,6 @@ public void canRead() throws Exception {
83
83
public void readXmlRootElementList () throws Exception {
84
84
String content = "<list><rootElement><type s=\" 1\" /></rootElement><rootElement><type s=\" 2\" /></rootElement></list>" ;
85
85
MockHttpInputMessage inputMessage = new MockHttpInputMessage (content .getBytes ("UTF-8" ));
86
-
87
86
List <RootElement > result = (List <RootElement >) converter .read (rootElementListType , null , inputMessage );
88
87
89
88
assertEquals ("Invalid result" , 2 , result .size ());
@@ -96,7 +95,6 @@ public void readXmlRootElementList() throws Exception {
96
95
public void readXmlRootElementSet () throws Exception {
97
96
String content = "<set><rootElement><type s=\" 1\" /></rootElement><rootElement><type s=\" 2\" /></rootElement></set>" ;
98
97
MockHttpInputMessage inputMessage = new MockHttpInputMessage (content .getBytes ("UTF-8" ));
99
-
100
98
Set <RootElement > result = (Set <RootElement >) converter .read (rootElementSetType , null , inputMessage );
101
99
102
100
assertEquals ("Invalid result" , 2 , result .size ());
@@ -109,7 +107,6 @@ public void readXmlRootElementSet() throws Exception {
109
107
public void readXmlTypeList () throws Exception {
110
108
String content = "<list><foo s=\" 1\" /><bar s=\" 2\" /></list>" ;
111
109
MockHttpInputMessage inputMessage = new MockHttpInputMessage (content .getBytes ("UTF-8" ));
112
-
113
110
List <TestType > result = (List <TestType >) converter .read (typeListType , null , inputMessage );
114
111
115
112
assertEquals ("Invalid result" , 2 , result .size ());
@@ -122,7 +119,6 @@ public void readXmlTypeList() throws Exception {
122
119
public void readXmlTypeSet () throws Exception {
123
120
String content = "<set><foo s=\" 1\" /><bar s=\" 2\" /></set>" ;
124
121
MockHttpInputMessage inputMessage = new MockHttpInputMessage (content .getBytes ("UTF-8" ));
125
-
126
122
Set <TestType > result = (Set <TestType >) converter .read (typeSetType , null , inputMessage );
127
123
128
124
assertEquals ("Invalid result" , 2 , result .size ());
@@ -133,7 +129,6 @@ public void readXmlTypeSet() throws Exception {
133
129
@ Test
134
130
@ SuppressWarnings ("unchecked" )
135
131
public void readXmlRootElementExternalEntityDisabled () throws Exception {
136
-
137
132
Resource external = new ClassPathResource ("external.txt" , getClass ());
138
133
String content = "<!DOCTYPE root [" +
139
134
" <!ELEMENT external ANY >\n " +
@@ -142,7 +137,6 @@ public void readXmlRootElementExternalEntityDisabled() throws Exception {
142
137
MockHttpInputMessage inputMessage = new MockHttpInputMessage (content .getBytes ("UTF-8" ));
143
138
144
139
converter = new Jaxb2CollectionHttpMessageConverter <Collection <Object >>() {
145
-
146
140
@ Override
147
141
protected XMLInputFactory createXmlInputFactory () {
148
142
XMLInputFactory inputFactory = super .createXmlInputFactory ();
@@ -164,7 +158,6 @@ protected XMLInputFactory createXmlInputFactory() {
164
158
@ Test
165
159
@ SuppressWarnings ("unchecked" )
166
160
public void readXmlRootElementExternalEntityEnabled () throws Exception {
167
-
168
161
Resource external = new ClassPathResource ("external.txt" , getClass ());
169
162
String content = "<!DOCTYPE root [" +
170
163
" <!ELEMENT external ANY >\n " +
@@ -278,4 +271,4 @@ public int hashCode() {
278
271
}
279
272
}
280
273
281
- }
274
+ }
0 commit comments