Skip to content
This repository has been archived by the owner on Mar 1, 2023. It is now read-only.

Commit

Permalink
Fix compiler registration
Browse files Browse the repository at this point in the history
Append the language to the compiler prefix
  • Loading branch information
marschall committed Jul 26, 2021
1 parent 88d25a7 commit f14da24
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
import net.sf.jasperreports.engine.DefaultJasperReportsContext;
import net.sf.jasperreports.engine.JRException;
import net.sf.jasperreports.engine.JRPropertiesUtil;
import net.sf.jasperreports.engine.JRReport;
import net.sf.jasperreports.engine.design.JRCompiler;
import net.sf.jasperreports.engine.design.JRJdtCompiler;
import net.sf.jasperreports.engine.xml.JRReportSaxParserFactory;
Expand Down Expand Up @@ -303,7 +304,7 @@ private void configureJasper() {
DefaultJasperReportsContext jrContext = DefaultJasperReportsContext.getInstance();

jrContext.setProperty(JRReportSaxParserFactory.COMPILER_XML_VALIDATION, String.valueOf(xmlValidation));
jrContext.setProperty(JRCompiler.COMPILER_PREFIX, compiler == null ? JRJdtCompiler.class.getName() : compiler);
jrContext.setProperty(JRCompiler.COMPILER_PREFIX + JRReport.LANGUAGE_JAVA, compiler == null ? JRJdtCompiler.class.getName() : compiler);
jrContext.setProperty(JRCompiler.COMPILER_KEEP_JAVA_FILE, Boolean.FALSE.toString());

if (additionalProperties != null) {
Expand Down

0 comments on commit f14da24

Please sign in to comment.