Skip to content

Commit 4b9b1b0

Browse files
committed
warnings cleanup
1 parent 3c3df54 commit 4b9b1b0

File tree

2 files changed

+10
-11
lines changed

2 files changed

+10
-11
lines changed

src/main/java/com/fasterxml/jackson/dataformat/xml/XmlTypeResolverBuilder.java

+2
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@ public String idFromValue(Object value)
126126
return encodeXmlClassName(super.idFromValue(value));
127127
}
128128

129+
@SuppressWarnings("deprecation")
129130
@Override
130131
public JavaType typeFromId(String id) {
131132
return super.typeFromId(decodeXmlClassName(id));
@@ -151,6 +152,7 @@ public String idFromValue(Object value)
151152
return encodeXmlClassName(super.idFromValue(value));
152153
}
153154

155+
@SuppressWarnings("deprecation")
154156
@Override
155157
public JavaType typeFromId(String id) {
156158
return super.typeFromId(decodeXmlClassName(id));

src/test/java/com/fasterxml/jackson/dataformat/xml/unwrapped/TestXmlText.java

+8-11
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22

33
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
44
import com.fasterxml.jackson.annotation.JsonInclude.Include;
5-
import com.fasterxml.jackson.databind.SerializationFeature;
65
import com.fasterxml.jackson.dataformat.xml.XmlMapper;
76
import com.fasterxml.jackson.dataformat.xml.XmlTestBase;
87
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlText;
98

10-
public class TestXmlText extends XmlTestBase{
9+
public class TestXmlText extends XmlTestBase
10+
{
1111
@JsonPropertyOrder({"first","second"})
1212
class Data{
1313
@JacksonXmlText
@@ -18,15 +18,12 @@ public Data(String first, String second) {
1818
this.second = second;
1919
}
2020
}
21-
22-
private final XmlMapper MAPPER = new XmlMapper();
23-
{ // easier for eye, uncomment for testing
24-
// MAPPER.enable(SerializationFeature.INDENT_OUTPUT);
25-
}
26-
27-
public void testXmlTextWithSuppressedValue() throws Exception {
28-
MAPPER.setSerializationInclusion(Include.NON_EMPTY);
29-
String xml = MAPPER.writeValueAsString(new Data("","second"));
21+
22+
public void testXmlTextWithSuppressedValue() throws Exception
23+
{
24+
final XmlMapper mapper = new XmlMapper();
25+
mapper.setSerializationInclusion(Include.NON_EMPTY);
26+
String xml = mapper.writeValueAsString(new Data("","second"));
3027
String expectedXml = "<Data><second>second</second></Data>";
3128
assertEquals(expectedXml, xml);
3229
}

0 commit comments

Comments
 (0)