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=789ee8248d996abd269cd28b7bb8f6e611b84576;hpb=9013e567cd592fccefd801bd8c97440a810c3574;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 789ee8248d..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.Draft16; +import org.opendaylight.restconf.Rfc8040; import org.opendaylight.restconf.utils.RestconfConstants; @Provider @Produces({Draft02.MediaTypes.PATCH_STATUS + RestconfService.XML, - Draft16.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);