1
0
mirror of https://github.com/OpenNebula/one.git synced 2024-12-22 13:33:52 +03:00

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

This commit is contained in:
Victor Palma 2022-09-13 10:33:05 +02:00 committed by GitHub
parent e14934396b
commit bcd319feb3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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();
}