diff --git a/spark-template-velocity/pom.xml b/spark-template-velocity/pom.xml index 3f3c701..1d10d10 100644 --- a/spark-template-velocity/pom.xml +++ b/spark-template-velocity/pom.xml @@ -33,15 +33,15 @@ UTF-8 - 2.5.5 - 4.12 + 2.9.4 + 4.13.2 org.apache.velocity - velocity - 1.7 + velocity-engine-core + 2.3 com.sparkjava diff --git a/spark-template-velocity/src/main/java/spark/template/velocity/VelocityTemplateEngine.java b/spark-template-velocity/src/main/java/spark/template/velocity/VelocityTemplateEngine.java index 8005c28..580b3fa 100644 --- a/spark-template-velocity/src/main/java/spark/template/velocity/VelocityTemplateEngine.java +++ b/spark-template-velocity/src/main/java/spark/template/velocity/VelocityTemplateEngine.java @@ -74,13 +74,14 @@ public VelocityTemplateEngine(VelocityEngine velocityEngine) { /** * {@inheritDoc} */ + @SuppressWarnings("unchecked") @Override public String render(ModelAndView modelAndView) { String templateEncoding = Optional.ofNullable(this.encoding).orElse(StandardCharsets.UTF_8.name()); Template template = velocityEngine.getTemplate(modelAndView.getViewName(), templateEncoding); Object model = modelAndView.getModel(); if (model instanceof Map) { - Map modelMap = (Map) model; + Map modelMap = (Map) model; VelocityContext context = new VelocityContext(modelMap); StringWriter writer = new StringWriter(); template.merge(context, writer);