From 9d77b3d665e00f22e8d361aa1df08478cad8e224 Mon Sep 17 00:00:00 2001 From: hieplq Date: Wed, 24 Oct 2018 12:39:44 +0700 Subject: [PATCH] IDEMPIERE-3798:Move iDempiere default branch to openjdk 10 (IDEMPIERE-3531) --- .../WEB-INF/src/org/adempiere/webui/window/ZkJRViewer.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/ZkJRViewer.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/ZkJRViewer.java index 376cf2614c..ac0f4e675f 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/ZkJRViewer.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/ZkJRViewer.java @@ -53,11 +53,12 @@ import net.sf.jasperreports.engine.DefaultJasperReportsContext; import net.sf.jasperreports.engine.JRException; import net.sf.jasperreports.engine.JasperPrint; import net.sf.jasperreports.engine.JasperReport; +import net.sf.jasperreports.engine.JasperReportsContext; +import net.sf.jasperreports.engine.SimpleJasperReportsContext; import net.sf.jasperreports.engine.export.HtmlExporter; import net.sf.jasperreports.engine.export.JRCsvExporter; import net.sf.jasperreports.engine.export.JRPdfExporter; import net.sf.jasperreports.engine.export.JRXlsExporter; -import net.sf.jasperreports.engine.util.LocalJasperReportsContext; import net.sf.jasperreports.export.SimpleCsvExporterConfiguration; import net.sf.jasperreports.export.SimpleExporterInput; import net.sf.jasperreports.export.SimpleHtmlExporterOutput; @@ -454,8 +455,7 @@ public class ZkJRViewer extends Window implements EventListener, ITabOnCl log.log(Level.FINE, "Path="+path + " Prefix="+prefix); } File file = new File(FileUtil.getTempMailName(prefix, ".pdf")); - LocalJasperReportsContext context = new LocalJasperReportsContext(DefaultJasperReportsContext.getInstance()); - context.setClassLoader(JRPdfExporter.class.getClassLoader()); + JasperReportsContext context = new SimpleJasperReportsContext(DefaultJasperReportsContext.getInstance()); JRPdfExporter exporter = new JRPdfExporter(context); if (!isList){ jasperPrintList = new ArrayList<>();