Skip to content

Commit

Permalink
Makng GeoServer compile after removal of deprecated methods/objects i…
Browse files Browse the repository at this point in the history
…n GeotTools and GeoWebCache
  • Loading branch information
aaime committed Jun 1, 2019
1 parent acfdccc commit fca7274
Show file tree
Hide file tree
Showing 124 changed files with 577 additions and 841 deletions.
Expand Up @@ -40,23 +40,23 @@ public class MBStyleHandler extends StyleHandler {
TEMPLATES.put( TEMPLATES.put(
StyleType.GENERIC, StyleType.GENERIC,
IOUtils.toString( IOUtils.toString(
MBStyleHandler.class.getResourceAsStream("template_generic.json"))); MBStyleHandler.class.getResourceAsStream("template_generic.json"), "UTF-8"));
TEMPLATES.put( TEMPLATES.put(
StyleType.POINT, StyleType.POINT,
IOUtils.toString( IOUtils.toString(
MBStyleHandler.class.getResourceAsStream("template_point.json"))); MBStyleHandler.class.getResourceAsStream("template_point.json"), "UTF-8"));
TEMPLATES.put( TEMPLATES.put(
StyleType.POLYGON, StyleType.POLYGON,
IOUtils.toString( IOUtils.toString(
MBStyleHandler.class.getResourceAsStream("template_polygon.json"))); MBStyleHandler.class.getResourceAsStream("template_polygon.json"), "UTF-8"));
TEMPLATES.put( TEMPLATES.put(
StyleType.LINE, StyleType.LINE,
IOUtils.toString( IOUtils.toString(
MBStyleHandler.class.getResourceAsStream("template_line.json"))); MBStyleHandler.class.getResourceAsStream("template_line.json"), "UTF-8"));
TEMPLATES.put( TEMPLATES.put(
StyleType.RASTER, StyleType.RASTER,
IOUtils.toString( IOUtils.toString(
MBStyleHandler.class.getResourceAsStream("template_raster.json"))); MBStyleHandler.class.getResourceAsStream("template_raster.json"), "UTF-8"));
} catch (IOException e) { } catch (IOException e) {
throw new RuntimeException("Error loading up the style templates", e); throw new RuntimeException("Error loading up the style templates", e);
} }
Expand Down
Expand Up @@ -67,7 +67,7 @@ public void getBodyAsJsonUsingAcceptHeader() throws Exception {
assertEquals(200, response.getStatus()); assertEquals(200, response.getStatus());
assertEquals(MBStyleHandler.MIME_TYPE, response.getContentType()); assertEquals(MBStyleHandler.MIME_TYPE, response.getContentType());
String responseContent = response.getContentAsString(); String responseContent = response.getContentAsString();
String expected = IOUtils.toString(this.getClass().getResourceAsStream("teststyle.json")); String expected = IOUtils.toString(this.getClass().getResourceAsStream("teststyle.json"), "UTF-8");
assertEquals(expected, responseContent); assertEquals(expected, responseContent);
} }


Expand Down
Expand Up @@ -698,25 +698,12 @@ protected void removeChildFeatures(final List<String> collectionIdentifiers)
linkStore.removeFeatures(linksFilter); linkStore.removeFeatures(linksFilter);
} }


@Override
public void modifyFeatures(AttributeDescriptor[] types, Object[] values, Filter filter)
throws IOException {
Name[] names = Stream.of(types).map(type -> type.getName()).toArray(size -> new Name[size]);
modifyFeatures(names, values, filter);
}

@Override @Override
public void modifyFeatures(Name attributeName, Object attributeValue, Filter filter) public void modifyFeatures(Name attributeName, Object attributeValue, Filter filter)
throws IOException { throws IOException {
modifyFeatures(new Name[] {attributeName}, new Object[] {attributeValue}, filter); modifyFeatures(new Name[] {attributeName}, new Object[] {attributeValue}, filter);
} }


@Override
public void modifyFeatures(AttributeDescriptor type, Object value, Filter filter)
throws IOException {
modifyFeatures(type.getName(), value, filter);
}

@Override @Override
public void modifyFeatures(Name[] attributeNames, Object[] attributeValues, Filter filter) public void modifyFeatures(Name[] attributeNames, Object[] attributeValues, Filter filter)
throws IOException { throws IOException {
Expand Down
Expand Up @@ -66,27 +66,13 @@ public void modifyFeatures(Name[] attributeNames, Object[] attributeValues, Filt
delegate.modifyFeatures(attributeNames, attributeValues, mixedFilter); delegate.modifyFeatures(attributeNames, attributeValues, mixedFilter);
} }


@Override
public void modifyFeatures(AttributeDescriptor[] type, Object[] value, Filter filter)
throws IOException {
Filter mixedFilter = mixFilter(filter);
delegate.modifyFeatures(type, value, mixedFilter);
}

@Override @Override
public void modifyFeatures(Name attributeName, Object attributeValue, Filter filter) public void modifyFeatures(Name attributeName, Object attributeValue, Filter filter)
throws IOException { throws IOException {
Filter mixedFilter = mixFilter(filter); Filter mixedFilter = mixFilter(filter);
delegate.modifyFeatures(attributeName, attributeValue, mixedFilter); delegate.modifyFeatures(attributeName, attributeValue, mixedFilter);
} }


@Override
public void modifyFeatures(AttributeDescriptor type, Object value, Filter filter)
throws IOException {
Filter mixedFilter = mixFilter(filter);
delegate.modifyFeatures(type, value, mixedFilter);
}

@Override @Override
public void setFeatures(FeatureReader<SimpleFeatureType, SimpleFeature> reader) public void setFeatures(FeatureReader<SimpleFeatureType, SimpleFeature> reader)
throws IOException { throws IOException {
Expand Down
Expand Up @@ -137,7 +137,7 @@ public void setupTestCollectionAndProduct() throws IOException, Exception {
} }


protected String getTestStringData(String location) throws IOException { protected String getTestStringData(String location) throws IOException {
return IOUtils.toString(getClass().getResourceAsStream(location)); return IOUtils.toString(getClass().getResourceAsStream(location), "UTF-8");
} }


@Test @Test
Expand Down
Expand Up @@ -54,7 +54,7 @@ public void testDescribeProcess() throws Exception {


@Test @Test
public void testAnimateBmTime() throws Exception { public void testAnimateBmTime() throws Exception {
String xml = IOUtils.toString(getClass().getResourceAsStream("animateBlueMarble.xml")); String xml = IOUtils.toString(getClass().getResourceAsStream("animateBlueMarble.xml"), "UTF-8");
MockHttpServletResponse response = postAsServletResponse("wps", xml); MockHttpServletResponse response = postAsServletResponse("wps", xml);
assertEquals("video/mp4", response.getContentType()); assertEquals("video/mp4", response.getContentType());


Expand Down Expand Up @@ -102,7 +102,7 @@ public void testAnimateFrameLimits() throws Exception {
props.store(os, null); props.store(os, null);
} }
try { try {
String xml = IOUtils.toString(getClass().getResourceAsStream("animateBlueMarble.xml")); String xml = IOUtils.toString(getClass().getResourceAsStream("animateBlueMarble.xml"), "UTF-8");
Document dom = postAsDOM("wps", xml); Document dom = postAsDOM("wps", xml);
// print(dom); // print(dom);
XMLAssert.assertXpathExists("//wps:ProcessFailed", dom); XMLAssert.assertXpathExists("//wps:ProcessFailed", dom);
Expand All @@ -121,7 +121,7 @@ public void testAnimateFrameLimits() throws Exception {


@Test @Test
public void testAnimateDecoration() throws Exception { public void testAnimateDecoration() throws Exception {
String xml = IOUtils.toString(getClass().getResourceAsStream("animateDecoration.xml")); String xml = IOUtils.toString(getClass().getResourceAsStream("animateDecoration.xml"), "UTF-8");
MockHttpServletResponse response = postAsServletResponse("wps", xml); MockHttpServletResponse response = postAsServletResponse("wps", xml);
assertEquals("video/mp4", response.getContentType()); assertEquals("video/mp4", response.getContentType());


Expand All @@ -147,7 +147,7 @@ public void testAnimateDecoration() throws Exception {
public void testAnimateTimestamped() throws Exception { public void testAnimateTimestamped() throws Exception {
String xml = String xml =
IOUtils.toString( IOUtils.toString(
getClass().getResourceAsStream("animateBlueMarbleTimestamped.xml")); getClass().getResourceAsStream("animateBlueMarbleTimestamped.xml"), "UTF-8");
MockHttpServletResponse response = postAsServletResponse("wps", xml); MockHttpServletResponse response = postAsServletResponse("wps", xml);
assertEquals("video/mp4", response.getContentType()); assertEquals("video/mp4", response.getContentType());


Expand Down
Expand Up @@ -53,7 +53,7 @@ public void testDescribeProcess() throws Exception {


@Test @Test
public void testExecuteSingleLayer() throws Exception { public void testExecuteSingleLayer() throws Exception {
String xml = IOUtils.toString(getClass().getResourceAsStream("mapSimple.xml")); String xml = IOUtils.toString(getClass().getResourceAsStream("mapSimple.xml"), "UTF-8");
MockHttpServletResponse response = postAsServletResponse("wps", xml); MockHttpServletResponse response = postAsServletResponse("wps", xml);
assertEquals("image/png", response.getContentType()); assertEquals("image/png", response.getContentType());
BufferedImage image = BufferedImage image =
Expand All @@ -63,7 +63,7 @@ public void testExecuteSingleLayer() throws Exception {


@Test @Test
public void testExecuteSingleLayerFilter() throws Exception { public void testExecuteSingleLayerFilter() throws Exception {
String xml = IOUtils.toString(getClass().getResourceAsStream("mapSimpleFilter.xml")); String xml = IOUtils.toString(getClass().getResourceAsStream("mapSimpleFilter.xml"), "UTF-8");
MockHttpServletResponse response = postAsServletResponse("wps", xml); MockHttpServletResponse response = postAsServletResponse("wps", xml);
assertEquals("image/png", response.getContentType()); assertEquals("image/png", response.getContentType());
BufferedImage image = BufferedImage image =
Expand All @@ -73,7 +73,7 @@ public void testExecuteSingleLayerFilter() throws Exception {


@Test @Test
public void testExecuteSingleDecorated() throws Exception { public void testExecuteSingleDecorated() throws Exception {
String xml = IOUtils.toString(getClass().getResourceAsStream("mapSimpleDecorated.xml")); String xml = IOUtils.toString(getClass().getResourceAsStream("mapSimpleDecorated.xml"), "UTF-8");
MockHttpServletResponse response = postAsServletResponse("wps", xml); MockHttpServletResponse response = postAsServletResponse("wps", xml);
assertEquals("image/png", response.getContentType()); assertEquals("image/png", response.getContentType());
BufferedImage image = BufferedImage image =
Expand All @@ -83,7 +83,7 @@ public void testExecuteSingleDecorated() throws Exception {


@Test @Test
public void testExecuteMultiName() throws Exception { public void testExecuteMultiName() throws Exception {
String xml = IOUtils.toString(getClass().getResourceAsStream("mapMultiName.xml")); String xml = IOUtils.toString(getClass().getResourceAsStream("mapMultiName.xml"), "UTF-8");
MockHttpServletResponse response = postAsServletResponse("wps", xml); MockHttpServletResponse response = postAsServletResponse("wps", xml);
assertEquals("image/png", response.getContentType()); assertEquals("image/png", response.getContentType());
assertEquals("inline; filename=result.png", response.getHeader("Content-disposition")); assertEquals("inline; filename=result.png", response.getHeader("Content-disposition"));
Expand All @@ -94,7 +94,7 @@ public void testExecuteMultiName() throws Exception {


@Test @Test
public void testExecuteMultiLayer() throws Exception { public void testExecuteMultiLayer() throws Exception {
String xml = IOUtils.toString(getClass().getResourceAsStream("mapMultiLayer.xml")); String xml = IOUtils.toString(getClass().getResourceAsStream("mapMultiLayer.xml"), "UTF-8");
MockHttpServletResponse response = postAsServletResponse("wps", xml); MockHttpServletResponse response = postAsServletResponse("wps", xml);
assertEquals("image/png", response.getContentType()); assertEquals("image/png", response.getContentType());
BufferedImage image = BufferedImage image =
Expand All @@ -115,15 +115,15 @@ public void testExecuteMultiLayerKmzShort() throws Exception {


@Test @Test
public void testExecuteGeotiff() throws Exception { public void testExecuteGeotiff() throws Exception {
String request = IOUtils.toString(getClass().getResourceAsStream("mapMultiLayer.xml")); String request = IOUtils.toString(getClass().getResourceAsStream("mapMultiLayer.xml"), "UTF-8");
request = request.replaceAll("image/png", "image/geotiff"); request = request.replaceAll("image/png", "image/geotiff");
MockHttpServletResponse response = postAsServletResponse("wps", request); MockHttpServletResponse response = postAsServletResponse("wps", request);
assertEquals("image/geotiff", response.getContentType()); assertEquals("image/geotiff", response.getContentType());
assertEquals("attachment; filename=result.tif", response.getHeader("Content-disposition")); assertEquals("attachment; filename=result.tif", response.getHeader("Content-disposition"));
} }


public void testExecutMultiLayerKmz(String mime) throws Exception { public void testExecutMultiLayerKmz(String mime) throws Exception {
String request = IOUtils.toString(getClass().getResourceAsStream("mapMultiLayer.xml")); String request = IOUtils.toString(getClass().getResourceAsStream("mapMultiLayer.xml"), "UTF-8");
request = request.replaceAll("image/png", mime); request = request.replaceAll("image/png", mime);
MockHttpServletResponse response = postAsServletResponse("wps", request); MockHttpServletResponse response = postAsServletResponse("wps", request);
assertEquals(KMZMapOutputFormat.MIME_TYPE, response.getContentType()); assertEquals(KMZMapOutputFormat.MIME_TYPE, response.getContentType());
Expand Down Expand Up @@ -161,7 +161,7 @@ public void testExecutMultiLayerKmz(String mime) throws Exception {


@Test @Test
public void testTimeFilter() throws Exception { public void testTimeFilter() throws Exception {
String xml = IOUtils.toString(getClass().getResourceAsStream("mapTimeFilter.xml")); String xml = IOUtils.toString(getClass().getResourceAsStream("mapTimeFilter.xml"), "UTF-8");
MockHttpServletResponse response = postAsServletResponse("wps", xml); MockHttpServletResponse response = postAsServletResponse("wps", xml);
assertEquals("image/png", response.getContentType()); assertEquals("image/png", response.getContentType());
BufferedImage image = BufferedImage image =
Expand All @@ -178,7 +178,7 @@ public void testTimeFilter() throws Exception {
@Test @Test
public void testTimeFilterTimestamped() throws Exception { public void testTimeFilterTimestamped() throws Exception {
String xml = String xml =
IOUtils.toString(getClass().getResourceAsStream("mapTimeFilterTimestamped.xml")); IOUtils.toString(getClass().getResourceAsStream("mapTimeFilterTimestamped.xml"), "UTF-8");
MockHttpServletResponse response = postAsServletResponse("wps", xml); MockHttpServletResponse response = postAsServletResponse("wps", xml);
assertEquals("image/png", response.getContentType()); assertEquals("image/png", response.getContentType());
BufferedImage image = BufferedImage image =
Expand All @@ -190,7 +190,7 @@ public void testTimeFilterTimestamped() throws Exception {
public void testTimeFilterFormattedTimestamp() throws Exception { public void testTimeFilterFormattedTimestamp() throws Exception {
String xml = String xml =
IOUtils.toString( IOUtils.toString(
getClass().getResourceAsStream("mapTimeFilterFormattedTimestamp.xml")); getClass().getResourceAsStream("mapTimeFilterFormattedTimestamp.xml"), "UTF-8");
MockHttpServletResponse response = postAsServletResponse("wps", xml); MockHttpServletResponse response = postAsServletResponse("wps", xml);
assertEquals("image/png", response.getContentType()); assertEquals("image/png", response.getContentType());
BufferedImage image = BufferedImage image =
Expand All @@ -201,7 +201,7 @@ public void testTimeFilterFormattedTimestamp() throws Exception {


@Test @Test
public void downloadMapGif() throws Exception { public void downloadMapGif() throws Exception {
String request = IOUtils.toString(getClass().getResourceAsStream("mapSimple.xml")); String request = IOUtils.toString(getClass().getResourceAsStream("mapSimple.xml"), "UTF-8");
request = request.replaceAll("image/png", "image/gif"); request = request.replaceAll("image/png", "image/gif");
MockHttpServletResponse response = postAsServletResponse("wps", request); MockHttpServletResponse response = postAsServletResponse("wps", request);
assertEquals("image/gif", response.getContentType()); assertEquals("image/gif", response.getContentType());
Expand All @@ -212,8 +212,8 @@ public void downloadMapGif() throws Exception {


@Test @Test
public void downloadRemoteSimple11() throws Exception { public void downloadRemoteSimple11() throws Exception {
String request = IOUtils.toString(getClass().getResourceAsStream("mapRemoteSimple11.xml")); String request = IOUtils.toString(getClass().getResourceAsStream("mapRemoteSimple11.xml"), "UTF-8");
String caps111 = IOUtils.toString(getClass().getResourceAsStream("caps111.xml")); String caps111 = IOUtils.toString(getClass().getResourceAsStream("caps111.xml"), "UTF-8");
byte[] getMapBytes = FileUtils.readFileToByteArray(new File(SAMPLES + "mapSimple.png")); byte[] getMapBytes = FileUtils.readFileToByteArray(new File(SAMPLES + "mapSimple.png"));
DownloadMapProcess process = applicationContext.getBean(DownloadMapProcess.class); DownloadMapProcess process = applicationContext.getBean(DownloadMapProcess.class);
MockHttpClient client = new MockHttpClient(); MockHttpClient client = new MockHttpClient();
Expand Down Expand Up @@ -246,8 +246,8 @@ public void downloadRemoteSimple11() throws Exception {


@Test @Test
public void downloadRemoteSimple13() throws Exception { public void downloadRemoteSimple13() throws Exception {
String request = IOUtils.toString(getClass().getResourceAsStream("mapRemoteSimple13.xml")); String request = IOUtils.toString(getClass().getResourceAsStream("mapRemoteSimple13.xml"), "UTF-8");
String caps130 = IOUtils.toString(getClass().getResourceAsStream("caps130.xml")); String caps130 = IOUtils.toString(getClass().getResourceAsStream("caps130.xml"), "UTF-8");
byte[] getMapBytes = FileUtils.readFileToByteArray(new File(SAMPLES + "mapSimple.png")); byte[] getMapBytes = FileUtils.readFileToByteArray(new File(SAMPLES + "mapSimple.png"));
DownloadMapProcess process = applicationContext.getBean(DownloadMapProcess.class); DownloadMapProcess process = applicationContext.getBean(DownloadMapProcess.class);
MockHttpClient client = new MockHttpClient(); MockHttpClient client = new MockHttpClient();
Expand Down Expand Up @@ -279,8 +279,8 @@ public void downloadRemoteSimple13() throws Exception {


@Test @Test
public void downloadLocalRemote() throws Exception { public void downloadLocalRemote() throws Exception {
String request = IOUtils.toString(getClass().getResourceAsStream("mapLocalRemote.xml")); String request = IOUtils.toString(getClass().getResourceAsStream("mapLocalRemote.xml"), "UTF-8");
String caps111 = IOUtils.toString(getClass().getResourceAsStream("caps111.xml")); String caps111 = IOUtils.toString(getClass().getResourceAsStream("caps111.xml"), "UTF-8");
byte[] getMapBytes = FileUtils.readFileToByteArray(new File(SAMPLES + "lakes.png")); byte[] getMapBytes = FileUtils.readFileToByteArray(new File(SAMPLES + "lakes.png"));
DownloadMapProcess process = applicationContext.getBean(DownloadMapProcess.class); DownloadMapProcess process = applicationContext.getBean(DownloadMapProcess.class);
MockHttpClient client = new MockHttpClient(); MockHttpClient client = new MockHttpClient();
Expand Down
Expand Up @@ -283,8 +283,8 @@ public void testTwoQueriesNamespacesGml32() throws Exception {
IOUtils.toString( IOUtils.toString(
getClass() getClass()
.getClassLoader() .getClassLoader()
.getResourceAsStream( .getResourceAsStream("test-data/stations/stations_two_queries.xml"),
"test-data/stations/stations_two_queries.xml")); "UTF-8");
Document document = postAsDOM("wfs", wfsQuery); Document document = postAsDOM("wfs", wfsQuery);
checkCount( checkCount(
WFS20_XPATH_ENGINE, WFS20_XPATH_ENGINE,
Expand Down Expand Up @@ -319,7 +319,8 @@ public void testTwoQueriesNamespacesGml31() throws Exception {
getClass() getClass()
.getClassLoader() .getClassLoader()
.getResourceAsStream( .getResourceAsStream(
"test-data/stations/stations_two_queries_1.1.xml")); "test-data/stations/stations_two_queries_1.1.xml"),
"UTF-8");
Document document = postAsDOM("wfs", wfsQuery); Document document = postAsDOM("wfs", wfsQuery);
String output = toString(document); String output = toString(document);
checkCount( checkCount(
Expand Down
Expand Up @@ -267,7 +267,7 @@ private void createTables(Map<String, File> propertyFiles, String parser)
// be supported if present. // be supported if present.
Geometry geom = (Geometry) value; Geometry geom = (Geometry) value;
value = value =
new WKTWriter(Double.isNaN(geom.getCoordinate().z) ? 2 : 3) new WKTWriter(Double.isNaN(geom.getCoordinate().getZ()) ? 2 : 3)
.write(geom); .write(geom);
} }
if (value == null || value.toString().equalsIgnoreCase("null")) { if (value == null || value.toString().equalsIgnoreCase("null")) {
Expand Down
Expand Up @@ -209,7 +209,7 @@ private void createTables(Map<String, File> propertyFiles)
// be supported if present. // be supported if present.
Geometry geom = (Geometry) value; Geometry geom = (Geometry) value;
value = value =
new WKTWriter(Double.isNaN(geom.getCoordinate().z) ? 2 : 3) new WKTWriter(Double.isNaN(geom.getCoordinate().getZ()) ? 2 : 3)
.write(geom); .write(geom);
} }
if (value == null || value.toString().equalsIgnoreCase("null")) { if (value == null || value.toString().equalsIgnoreCase("null")) {
Expand Down
Expand Up @@ -46,19 +46,24 @@ public class CssHandler extends StyleHandler {
try { try {
TEMPLATES.put( TEMPLATES.put(
StyleType.POINT, StyleType.POINT,
IOUtils.toString(CssHandler.class.getResourceAsStream("template_point.css"))); IOUtils.toString(
CssHandler.class.getResourceAsStream("template_point.css"), "UTF-8"));
TEMPLATES.put( TEMPLATES.put(
StyleType.POLYGON, StyleType.POLYGON,
IOUtils.toString(CssHandler.class.getResourceAsStream("template_polygon.css"))); IOUtils.toString(
CssHandler.class.getResourceAsStream("template_polygon.css"), "UTF-8"));
TEMPLATES.put( TEMPLATES.put(
StyleType.LINE, StyleType.LINE,
IOUtils.toString(CssHandler.class.getResourceAsStream("template_line.css"))); IOUtils.toString(
CssHandler.class.getResourceAsStream("template_line.css"), "UTF-8"));
TEMPLATES.put( TEMPLATES.put(
StyleType.RASTER, StyleType.RASTER,
IOUtils.toString(CssHandler.class.getResourceAsStream("template_raster.css"))); IOUtils.toString(
CssHandler.class.getResourceAsStream("template_raster.css"), "UTF-8"));
TEMPLATES.put( TEMPLATES.put(
StyleType.GENERIC, StyleType.GENERIC,
IOUtils.toString(CssHandler.class.getResourceAsStream("template_generic.css"))); IOUtils.toString(
CssHandler.class.getResourceAsStream("template_generic.css"), "UTF-8"));
} catch (IOException e) { } catch (IOException e) {
throw new RuntimeException("Error loading up the css style templates", e); throw new RuntimeException("Error loading up the css style templates", e);
} }
Expand Down
Expand Up @@ -20,24 +20,12 @@ public InternationalString getTask() {
return null; return null;
} }


@Override
public String getDescription() {
// TODO Auto-generated method stub
return null;
}

@Override @Override
public void setTask(InternationalString task) { public void setTask(InternationalString task) {
// TODO Auto-generated method stub // TODO Auto-generated method stub


} }


@Override
public void setDescription(String description) {
// TODO Auto-generated method stub

}

@Override @Override
public void started() { public void started() {
// TODO Auto-generated method stub // TODO Auto-generated method stub
Expand Down
Expand Up @@ -101,7 +101,7 @@ protected String getResourceAsString(String resourceLocation) throws IOException
InputStream is = null; InputStream is = null;
try { try {
is = getClass().getResourceAsStream(resourceLocation); is = getClass().getResourceAsStream(resourceLocation);
return IOUtils.toString(is); return IOUtils.toString(is, "UTF-8");
} finally { } finally {
IOUtils.closeQuietly(is); IOUtils.closeQuietly(is);
} }
Expand Down

0 comments on commit fca7274

Please sign in to comment.