mirror of
https://bitbucket.org/wisemapping/wisemapping-open-source.git
synced 2024-11-22 06:07:57 +01:00
Fix test
This commit is contained in:
parent
e138923694
commit
b324415c18
@ -65,11 +65,11 @@ public class ExporterFactory {
|
|||||||
private static final String UTF_8_CHARSET_NAME = "UTF-8";
|
private static final String UTF_8_CHARSET_NAME = "UTF-8";
|
||||||
private File baseImgDir;
|
private File baseImgDir;
|
||||||
|
|
||||||
public ExporterFactory(@NotNull final ServletContext servletContext) throws ParserConfigurationException {
|
public ExporterFactory(@NotNull final ServletContext servletContext) {
|
||||||
this.baseImgDir = new File(servletContext.getRealPath("/"));
|
this.baseImgDir = new File(servletContext.getRealPath("/"));
|
||||||
}
|
}
|
||||||
|
|
||||||
public ExporterFactory(@NotNull final File baseImgDir) throws ParserConfigurationException {
|
public ExporterFactory(@NotNull final File baseImgDir) {
|
||||||
this.baseImgDir = baseImgDir;
|
this.baseImgDir = baseImgDir;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -112,12 +112,11 @@ public class ExporterFactory {
|
|||||||
final String svgString = normalizeSvg(mapSvg);
|
final String svgString = normalizeSvg(mapSvg);
|
||||||
CharArrayReader reader = new CharArrayReader(svgString.toCharArray());
|
CharArrayReader reader = new CharArrayReader(svgString.toCharArray());
|
||||||
final TranscoderInput input = new TranscoderInput(reader);
|
final TranscoderInput input = new TranscoderInput(reader);
|
||||||
reader.close();
|
|
||||||
|
|
||||||
TranscoderOutput trascoderOutput = new TranscoderOutput(output);
|
TranscoderOutput trascoderOutput = new TranscoderOutput(output);
|
||||||
|
|
||||||
// Save the image.
|
// Save the image.
|
||||||
transcoder.transcode(input, trascoderOutput);
|
transcoder.transcode(input, trascoderOutput);
|
||||||
|
reader.close();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case PDF: {
|
case PDF: {
|
||||||
@ -129,9 +128,9 @@ public class ExporterFactory {
|
|||||||
CharArrayReader reader = new CharArrayReader(svgString.toCharArray());
|
CharArrayReader reader = new CharArrayReader(svgString.toCharArray());
|
||||||
final TranscoderInput input = new TranscoderInput(reader);
|
final TranscoderInput input = new TranscoderInput(reader);
|
||||||
TranscoderOutput trascoderOutput = new TranscoderOutput(output);
|
TranscoderOutput trascoderOutput = new TranscoderOutput(output);
|
||||||
reader.close();
|
|
||||||
// Save the image.
|
// Save the image.
|
||||||
transcoder.transcode(input, trascoderOutput);
|
transcoder.transcode(input, trascoderOutput);
|
||||||
|
reader.close();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case SVG: {
|
case SVG: {
|
||||||
|
Loading…
Reference in New Issue
Block a user