1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-22 18:50:08 +03:00

B #5243: Fix encoding in java binding (#2279)

(cherry picked from commit bcd319feb3bd3d7950df9dbe27ea0f9623e0aade)
This commit is contained in:
Victor Palma 2022-09-13 10:33:05 +02:00 committed by Tino Vázquez
parent 6b1127f180
commit 3411e80ff0
No known key found for this signature in database
GPG Key ID: 14201E424D02047E
3 changed files with 5 additions and 5 deletions

View File

@ -101,7 +101,7 @@ public class OneSystem
DocumentBuilder builder =
DocumentBuilderFactory.newInstance().newDocumentBuilder();
Document doc = builder.parse(
new ByteArrayInputStream(r.getMessage().getBytes()));
new ByteArrayInputStream(r.getMessage().getBytes("UTF-8")));
xml = doc.getDocumentElement();
}
@ -140,7 +140,7 @@ public class OneSystem
DocumentBuilder builder =
DocumentBuilderFactory.newInstance().newDocumentBuilder();
Document doc = builder.parse(
new ByteArrayInputStream(r.getMessage().getBytes()));
new ByteArrayInputStream(r.getMessage().getBytes("UTF-8")));
xml = doc.getDocumentElement();
}
@ -190,7 +190,7 @@ public class OneSystem
DocumentBuilder builder =
DocumentBuilderFactory.newInstance().newDocumentBuilder();
Document doc = builder.parse(
new ByteArrayInputStream(r.getMessage().getBytes()));
new ByteArrayInputStream(r.getMessage().getBytes("UTF-8")));
xml = doc.getDocumentElement();
}

View File

@ -190,7 +190,7 @@ public abstract class Pool{
builder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
doc = builder.parse(
new ByteArrayInputStream(info.getMessage().getBytes()));
new ByteArrayInputStream(info.getMessage().getBytes("UTF-8")));
xml = doc.getDocumentElement();
poolElements = (NodeList) xpath.evaluate(elementName, xml, XPathConstants.NODESET);

View File

@ -93,7 +93,7 @@ public abstract class PoolElement {
DocumentBuilder builder =
DocumentBuilderFactory.newInstance().newDocumentBuilder();
Document doc = builder.parse(
new ByteArrayInputStream(info.getMessage().getBytes()));
new ByteArrayInputStream(info.getMessage().getBytes("UTF-8")));
xml = doc.getDocumentElement();
}