jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fschumac...@apache.org
Subject [jmeter] branch master updated: Make allowed version of freemarker explicit
Date Sun, 08 Nov 2020 16:25:36 GMT
This is an automated email from the ASF dual-hosted git repository.

fschumacher pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/jmeter.git


The following commit(s) were added to refs/heads/master by this push:
     new ac45fba  Make allowed version of freemarker explicit
ac45fba is described below

commit ac45fba2701099f1dbd43e1b5c38eb8714f84735
Author: Felix Schumacher <felix.schumacher@internetallee.de>
AuthorDate: Tue Nov 3 16:04:29 2020 +0100

    Make allowed version of freemarker explicit
    
    The freemarker docs state, that it is not allowed to use Config#getVersion()
    directly, to specify the version, that we think we are compatible with.
    
    Therefore, let us specify the current version and update it, as we update
    the dependency or the templates.
---
 .../java/org/apache/jmeter/report/dashboard/HtmlTemplateExporter.java   | 2 +-
 src/core/src/main/java/org/apache/jmeter/util/TemplateUtil.java         | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/core/src/main/java/org/apache/jmeter/report/dashboard/HtmlTemplateExporter.java
b/src/core/src/main/java/org/apache/jmeter/report/dashboard/HtmlTemplateExporter.java
index a886d74..45c8dde 100644
--- a/src/core/src/main/java/org/apache/jmeter/report/dashboard/HtmlTemplateExporter.java
+++ b/src/core/src/main/java/org/apache/jmeter/report/dashboard/HtmlTemplateExporter.java
@@ -442,7 +442,7 @@ public class HtmlTemplateExporter extends AbstractDataExporter {
         addToContext(DATA_CTX_OVERALL_FILTER, configuration.getSampleFilter(), dataContext);
 
         // Walk template directory to copy files and process templated ones
-        Configuration templateCfg = new Configuration(Configuration.getVersion());
+        Configuration templateCfg = new Configuration(Configuration.VERSION_2_3_30);
         try {
             templateCfg.setDirectoryForTemplateLoading(templateDirectory);
             templateCfg.setTemplateExceptionHandler(TemplateExceptionHandler.RETHROW_HANDLER);
diff --git a/src/core/src/main/java/org/apache/jmeter/util/TemplateUtil.java b/src/core/src/main/java/org/apache/jmeter/util/TemplateUtil.java
index 97317cd..46db928 100644
--- a/src/core/src/main/java/org/apache/jmeter/util/TemplateUtil.java
+++ b/src/core/src/main/java/org/apache/jmeter/util/TemplateUtil.java
@@ -43,7 +43,7 @@ public final class TemplateUtil {
     }
 
     private static Configuration init() {
-        Configuration templateConfiguration = new Configuration(Configuration.getVersion());
+        Configuration templateConfiguration = new Configuration(Configuration.VERSION_2_3_30);
         templateConfiguration.setDefaultEncoding(StandardCharsets.UTF_8.name());
         templateConfiguration.setInterpolationSyntax(Configuration.SQUARE_BRACKET_INTERPOLATION_SYNTAX);
         templateConfiguration.setTemplateExceptionHandler(TemplateExceptionHandler.RETHROW_HANDLER);


Mime
View raw message