X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=restconf%2Fsal-rest-connector%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fnetconf%2Fsal%2Frest%2Fimpl%2FPATCHXmlBodyWriter.java;h=9a60cabc5e721e4d74468153c7e218defe8149af;hb=e4fb9cf5bc1fa2bda3d01ad60b37758f0b0df13c;hp=747e273453f4236108f91eb56cbfe6cecf2628b2;hpb=acbc3139281024824f927426562d25a1f764b34c;p=netconf.git diff --git a/restconf/sal-rest-connector/src/main/java/org/opendaylight/netconf/sal/rest/impl/PATCHXmlBodyWriter.java b/restconf/sal-rest-connector/src/main/java/org/opendaylight/netconf/sal/rest/impl/PATCHXmlBodyWriter.java index 747e273453..9a60cabc5e 100644 --- a/restconf/sal-rest-connector/src/main/java/org/opendaylight/netconf/sal/rest/impl/PATCHXmlBodyWriter.java +++ b/restconf/sal-rest-connector/src/main/java/org/opendaylight/netconf/sal/rest/impl/PATCHXmlBodyWriter.java @@ -12,6 +12,7 @@ import java.io.IOException; import java.io.OutputStream; import java.lang.annotation.Annotation; import java.lang.reflect.Type; +import java.nio.charset.StandardCharsets; import java.util.List; import javax.ws.rs.Produces; import javax.ws.rs.WebApplicationException; @@ -28,12 +29,12 @@ import org.opendaylight.netconf.sal.rest.api.RestconfService; import org.opendaylight.netconf.sal.restconf.impl.PATCHStatusContext; import org.opendaylight.netconf.sal.restconf.impl.PATCHStatusEntity; import org.opendaylight.netconf.sal.restconf.impl.RestconfError; -import org.opendaylight.restconf.Draft17; +import org.opendaylight.restconf.Rfc8040; import org.opendaylight.restconf.utils.RestconfConstants; @Provider @Produces({Draft02.MediaTypes.PATCH_STATUS + RestconfService.XML, - Draft17.MediaTypes.PATCH_STATUS + RestconfConstants.XML}) + Rfc8040.MediaTypes.PATCH_STATUS + RestconfConstants.XML}) public class PATCHXmlBodyWriter implements MessageBodyWriter { private static final XMLOutputFactory XML_FACTORY; @@ -62,7 +63,7 @@ public class PATCHXmlBodyWriter implements MessageBodyWriter throws IOException, WebApplicationException { try { - final XMLStreamWriter xmlWriter = XML_FACTORY.createXMLStreamWriter(entityStream); + final XMLStreamWriter xmlWriter = XML_FACTORY.createXMLStreamWriter(entityStream, StandardCharsets.UTF_8.name()); writeDocument(xmlWriter, patchStatusContext); } catch (final XMLStreamException e) { throw new IllegalStateException(e);