mirror of
https://github.com/apache/struts.git
synced 2026-08-05 14:47:09 +00:00
WW-5580 chore(core): use Configuration.VERSION_2_3_34 for FreeMarker config (#1798)
Aligns the FreeMarker incompatible_improvements setting with the FreeMarker 2.3.34 dependency already declared in the build. FreeMarker 2.3.34 declares VERSION_2_3_34 as an incompatible improvements break-point but does not gate any behaviour on it, so this is a no-op at runtime and purely keeps the setting in sync with the dependency. Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -358,7 +358,7 @@ public class FreemarkerManager {
|
||||
}
|
||||
|
||||
protected Version getFreemarkerVersion(ServletContext servletContext) {
|
||||
Version incompatibleImprovements = Configuration.VERSION_2_3_33;
|
||||
Version incompatibleImprovements = Configuration.VERSION_2_3_34;
|
||||
|
||||
String incompatibleImprovementsParam = servletContext.getInitParameter("freemarker." + Configuration.INCOMPATIBLE_IMPROVEMENTS_KEY_SNAKE_CASE);
|
||||
if (incompatibleImprovementsParam != null) {
|
||||
|
||||
@@ -97,7 +97,7 @@ public class FreemarkerManagerTest extends StrutsInternalTestCase {
|
||||
tpl.process(model, out);
|
||||
|
||||
// then
|
||||
assertEquals(Configuration.VERSION_2_3_33, configuration.getIncompatibleImprovements());
|
||||
assertEquals(Configuration.VERSION_2_3_34, configuration.getIncompatibleImprovements());
|
||||
assertEquals("<input type=\"text\" onclick=\"this.alert('It's an error message')\"/>", out.toString());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user