[java-support] branch main updated: IDP-1717 Stop using deprecated Velocity property names

Rod Widdowson rdw at steadingsoftware.com
Tue Jan 5 17:20:59 UTC 2021


This is an automated email from the git hooks/post-receive script.

rdw pushed a commit to branch main
in repository java-support.

View the commit online:
http://git.shibboleth.net/view/?p=java-support.git;a=commit;h=764da48797d48323e84f0211b0fb10ef278588cf

The following commit(s) were added to refs/heads/main by this push:
       new  764da48   IDP-1717 Stop using deprecated Velocity property names
764da48 is described below

commit 764da48797d48323e84f0211b0fb10ef278588cf
Author: Rod Widdowson <rdw at steadingsoftware.com>
AuthorDate: Tue Jan 5 17:04:43 2021 +0000

    IDP-1717 Stop using deprecated Velocity property names
    
    https://issues.shibboleth.net/jira/browse/IDP-1717
---
 .../utilities/java/support/velocity/VelocityEngine.java    | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/src/main/java/net/shibboleth/utilities/java/support/velocity/VelocityEngine.java b/src/main/java/net/shibboleth/utilities/java/support/velocity/VelocityEngine.java
index b1f917d..42c8c02 100644
--- a/src/main/java/net/shibboleth/utilities/java/support/velocity/VelocityEngine.java
+++ b/src/main/java/net/shibboleth/utilities/java/support/velocity/VelocityEngine.java
@@ -21,6 +21,8 @@ import java.util.Properties;
 
 import javax.annotation.Nonnull;
 
+import org.apache.velocity.runtime.RuntimeConstants;
+
 /**
  * This is a helper class for creating velocity engines.
  */
@@ -57,20 +59,20 @@ public final class VelocityEngine {
     /**
      * Returns the default velocity engine properties. Default properties include:
      * <ul>
-     * <li>"string.resource.loader.class","org.apache.velocity.runtime.resource.loader.StringResourceLoader"</li>
-     * <li>"classpath.resource.loader.class","org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader"</li>
-     * <li>"resource.loader", "classpath, string"</li>
+     * <li>"resource.loader.string.class","org.apache.velocity.runtime.resource.loader.StringResourceLoader"</li>
+     * <li>"resource.loader.classpath.class","org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader"</li>
+     * <li>"resource.loaders", "classpath, string"</li>
      * </ul>
      * 
      * @return velocity engine properties
      */
     @Nonnull public static Properties getDefaultProperties() {
         final Properties props = new Properties();
-        props.setProperty("string.resource.loader.class",
+        props.setProperty("resource.loader.string.class",
                 "org.apache.velocity.runtime.resource.loader.StringResourceLoader");
-        props.setProperty("classpath.resource.loader.class",
+        props.setProperty("resource.loader.classpath.class",
                 "org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader");
-        props.setProperty("resource.loader", "classpath, string");
+        props.setProperty(RuntimeConstants.RESOURCE_LOADERS, "classpath, string");
         return props;
     }
 }
\ No newline at end of file

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the commits mailing list