From a52f83d179f547a1e4a61e7d407b4add5d290ec3 Mon Sep 17 00:00:00 2001 From: Paulo Veiga Date: Sun, 16 Sep 2018 18:27:42 -0700 Subject: [PATCH] Fix test --- .../java/com/wisemapping/exporter/ExporterFactory.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/wise-webapp/src/main/java/com/wisemapping/exporter/ExporterFactory.java b/wise-webapp/src/main/java/com/wisemapping/exporter/ExporterFactory.java index 98859fe7..a4c6ebb0 100644 --- a/wise-webapp/src/main/java/com/wisemapping/exporter/ExporterFactory.java +++ b/wise-webapp/src/main/java/com/wisemapping/exporter/ExporterFactory.java @@ -65,11 +65,11 @@ public class ExporterFactory { private static final String UTF_8_CHARSET_NAME = "UTF-8"; private File baseImgDir; - public ExporterFactory(@NotNull final ServletContext servletContext) throws ParserConfigurationException { + public ExporterFactory(@NotNull final ServletContext servletContext) { this.baseImgDir = new File(servletContext.getRealPath("/")); } - public ExporterFactory(@NotNull final File baseImgDir) throws ParserConfigurationException { + public ExporterFactory(@NotNull final File baseImgDir) { this.baseImgDir = baseImgDir; } @@ -112,12 +112,11 @@ public class ExporterFactory { final String svgString = normalizeSvg(mapSvg); CharArrayReader reader = new CharArrayReader(svgString.toCharArray()); final TranscoderInput input = new TranscoderInput(reader); - reader.close(); - TranscoderOutput trascoderOutput = new TranscoderOutput(output); // Save the image. transcoder.transcode(input, trascoderOutput); + reader.close(); break; } case PDF: { @@ -129,9 +128,9 @@ public class ExporterFactory { CharArrayReader reader = new CharArrayReader(svgString.toCharArray()); final TranscoderInput input = new TranscoderInput(reader); TranscoderOutput trascoderOutput = new TranscoderOutput(output); - reader.close(); // Save the image. transcoder.transcode(input, trascoderOutput); + reader.close(); break; } case SVG: {