Fix for java6

This commit is contained in:
etj 2015-04-01 10:18:27 +02:00
parent c9f51cf388
commit 213ed8326d

View File

@ -35,7 +35,7 @@ import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
import java.nio.charset.Charset;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
@ -745,7 +745,7 @@ public class GeoServerRESTStyleManager extends GeoServerRESTAbstractManager {
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
try {
DocumentBuilder builder = factory.newDocumentBuilder();
InputStream stream = new ByteArrayInputStream(sldBody.getBytes(StandardCharsets.UTF_8));
InputStream stream = new ByteArrayInputStream(sldBody.getBytes(Charset.forName("UTF-8")));
Document doc = builder.parse(stream);
result = this.checkSLD10Version(doc);
} catch (SAXException ex) {