[java-identity-provider] branch main updated: IDP-1717 Handle deprecated velocity property names
Rod Widdowson
rdw at steadingsoftware.com
Tue Jan 5 17:31:56 UTC 2021
This is an automated email from the git hooks/post-receive script.
rdw pushed a commit to branch main
in repository java-identity-provider.
View the commit online:
http://git.shibboleth.net/view/?p=java-identity-provider.git;a=commit;h=7cdb37060abf8ee8e45ac9bdee2e11dd7885e220
The following commit(s) were added to refs/heads/main by this push:
new 7cdb37060 IDP-1717 Handle deprecated velocity property names
7cdb37060 is described below
commit 7cdb37060abf8ee8e45ac9bdee2e11dd7885e220
Author: Rod Widdowson <rdw at steadingsoftware.com>
AuthorDate: Tue Jan 5 17:29:25 2021 +0000
IDP-1717 Handle deprecated velocity property names
https://issues.shibboleth.net/jira/browse/IDP-1717
These changes are all in tests.
---
.../attribute/resolver/ad/impl/TemplateAttributeTest.java | 7 ++++---
.../resolver/dc/ldap/impl/LDAPDataConnectorTest.java | 7 ++++---
.../attribute/resolver/failfast/attributeResolverBeans.xml | 6 +++---
.../resolver/failfast/attributeResolverBeansDefaultFF.xml | 6 +++---
.../shibboleth/idp/attribute/resolver/filter/service.xml | 6 +++---
.../idp/attribute/resolver/spring/dc/http/spring-beans.xml | 6 +++---
.../attribute/resolver/spring/dc/storage/spring-beans.xml | 6 +++---
.../idp/attribute/resolver/spring/externalBeans.xml | 6 +++---
.../attribute/resolver/spring/mappedTemplateService.xml | 6 +++---
.../idp/attribute/resolver/spring/mapperTest.xml | 6 +++---
.../idp/attribute/resolver/spring/multiFileService.xml | 14 +++++++-------
.../shibboleth/idp/attribute/resolver/spring/service.xml | 6 +++---
.../shibboleth/idp/attribute/resolver/spring/service2.xml | 14 +++++++-------
.../idp/attribute/resolver/spring/serviceNullStrip.xml | 6 +++---
.../shibboleth/idp/attribute/resolver/spring/velocity2.xml | 6 +++---
.../idp/profile/spring/relyingparty/metadata/beans.xml | 6 +++---
16 files changed, 58 insertions(+), 56 deletions(-)
diff --git a/idp-attribute-resolver-impl/src/test/java/net/shibboleth/idp/attribute/resolver/ad/impl/TemplateAttributeTest.java b/idp-attribute-resolver-impl/src/test/java/net/shibboleth/idp/attribute/resolver/ad/impl/TemplateAttributeTest.java
index 207e7077e..271eeffbe 100644
--- a/idp-attribute-resolver-impl/src/test/java/net/shibboleth/idp/attribute/resolver/ad/impl/TemplateAttributeTest.java
+++ b/idp-attribute-resolver-impl/src/test/java/net/shibboleth/idp/attribute/resolver/ad/impl/TemplateAttributeTest.java
@@ -26,6 +26,7 @@ import java.util.List;
import java.util.Set;
import org.apache.velocity.app.VelocityEngine;
+import org.apache.velocity.runtime.RuntimeConstants;
import org.testng.annotations.Test;
import net.shibboleth.idp.attribute.EmptyAttributeValue;
@@ -80,11 +81,11 @@ public class TemplateAttributeTest {
if (null == engineSingleton) {
engineSingleton = new VelocityEngine();
try {
- engineSingleton.addProperty("string.resource.loader.class",
+ engineSingleton.addProperty("resource.loader.string.class",
"org.apache.velocity.runtime.resource.loader.StringResourceLoader");
- engineSingleton.addProperty("classpath.resource.loader.class",
+ engineSingleton.addProperty("resource.loader.classpath.class",
"org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader");
- engineSingleton.addProperty("resource.loader", "classpath, string");
+ engineSingleton.addProperty(RuntimeConstants.RESOURCE_LOADERS, "classpath, string");
engineSingleton.init();
} catch (final Exception e) {
fail("couldn't create engine", e);
diff --git a/idp-attribute-resolver-impl/src/test/java/net/shibboleth/idp/attribute/resolver/dc/ldap/impl/LDAPDataConnectorTest.java b/idp-attribute-resolver-impl/src/test/java/net/shibboleth/idp/attribute/resolver/dc/ldap/impl/LDAPDataConnectorTest.java
index 7875219ff..72691a8d3 100644
--- a/idp-attribute-resolver-impl/src/test/java/net/shibboleth/idp/attribute/resolver/dc/ldap/impl/LDAPDataConnectorTest.java
+++ b/idp-attribute-resolver-impl/src/test/java/net/shibboleth/idp/attribute/resolver/dc/ldap/impl/LDAPDataConnectorTest.java
@@ -31,6 +31,7 @@ import java.util.Properties;
import javax.annotation.Nonnull;
+import org.apache.velocity.runtime.RuntimeConstants;
import org.ldaptive.ConnectionFactory;
import org.ldaptive.DefaultConnectionFactory;
import org.ldaptive.SearchExecutor;
@@ -298,9 +299,9 @@ public class LDAPDataConnectorTest {
builder.setTemplateText("(uid=${resolutionContext.AttributeRecipientID.toString().substring(99, 106)})");
final Properties props = new Properties();
// TODO, should expose a way to set the strict prop underneath
- props.setProperty("runtime.references.strict", "true");
- props.setProperty("string.resource.loader.class", "org.apache.velocity.runtime.resource.loader.StringResourceLoader");
- props.setProperty("resource.loader", "classpath, string");
+ props.setProperty(RuntimeConstants.RUNTIME_REFERENCES_STRICT, "true");
+ props.setProperty("resource.loader.string.class", "org.apache.velocity.runtime.resource.loader.StringResourceLoader");
+ props.setProperty(RuntimeConstants.RESOURCE_LOADERS, "classpath, string");
builder.setVelocityEngine(VelocityEngine.newVelocityEngine(props));
builder.initialize();
resolve(builder);
diff --git a/idp-attribute-resolver-spring/src/test/resources/net/shibboleth/idp/attribute/resolver/failfast/attributeResolverBeans.xml b/idp-attribute-resolver-spring/src/test/resources/net/shibboleth/idp/attribute/resolver/failfast/attributeResolverBeans.xml
index 9c1782eed..d9b874f30 100644
--- a/idp-attribute-resolver-spring/src/test/resources/net/shibboleth/idp/attribute/resolver/failfast/attributeResolverBeans.xml
+++ b/idp-attribute-resolver-spring/src/test/resources/net/shibboleth/idp/attribute/resolver/failfast/attributeResolverBeans.xml
@@ -33,11 +33,11 @@
<bean id="shibboleth.VelocityEngine" class="net.shibboleth.ext.spring.velocity.VelocityEngineFactoryBean">
<property name="velocityProperties">
<props>
- <prop key="resource.loader">classpath, string</prop>
- <prop key="classpath.resource.loader.class">
+ <prop key="resource.loaders">classpath, string</prop>
+ <prop key="resource.loader.classpath.class">
org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader
</prop>
- <prop key="string.resource.loader.class">
+ <prop key="resource.loader.string.class">
org.apache.velocity.runtime.resource.loader.StringResourceLoader
</prop>
</props>
diff --git a/idp-attribute-resolver-spring/src/test/resources/net/shibboleth/idp/attribute/resolver/failfast/attributeResolverBeansDefaultFF.xml b/idp-attribute-resolver-spring/src/test/resources/net/shibboleth/idp/attribute/resolver/failfast/attributeResolverBeansDefaultFF.xml
index 734f3bb49..737fa7105 100644
--- a/idp-attribute-resolver-spring/src/test/resources/net/shibboleth/idp/attribute/resolver/failfast/attributeResolverBeansDefaultFF.xml
+++ b/idp-attribute-resolver-spring/src/test/resources/net/shibboleth/idp/attribute/resolver/failfast/attributeResolverBeansDefaultFF.xml
@@ -33,11 +33,11 @@
<bean id="shibboleth.VelocityEngine" class="net.shibboleth.ext.spring.velocity.VelocityEngineFactoryBean">
<property name="velocityProperties">
<props>
- <prop key="resource.loader">classpath, string</prop>
- <prop key="classpath.resource.loader.class">
+ <prop key="resource.loaders">classpath, string</prop>
+ <prop key="resource.loader.classpath.class">
org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader
</prop>
- <prop key="string.resource.loader.class">
+ <prop key="resource.loader.string.class">
org.apache.velocity.runtime.resource.loader.StringResourceLoader
</prop>
</props>
diff --git a/idp-attribute-resolver-spring/src/test/resources/net/shibboleth/idp/attribute/resolver/filter/service.xml b/idp-attribute-resolver-spring/src/test/resources/net/shibboleth/idp/attribute/resolver/filter/service.xml
index e53717819..ba6c027fb 100644
--- a/idp-attribute-resolver-spring/src/test/resources/net/shibboleth/idp/attribute/resolver/filter/service.xml
+++ b/idp-attribute-resolver-spring/src/test/resources/net/shibboleth/idp/attribute/resolver/filter/service.xml
@@ -47,11 +47,11 @@
class="net.shibboleth.ext.spring.velocity.VelocityEngineFactoryBean">
<property name="velocityProperties">
<props>
- <prop key="resource.loader">classpath, string</prop>
- <prop key="classpath.resource.loader.class">
+ <prop key="resource.loaders">classpath, string</prop>
+ <prop key="resource.loader.classpath.class">
org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader
</prop>
- <prop key="string.resource.loader.class">
+ <prop key="resource.loader.string.class">
org.apache.velocity.runtime.resource.loader.StringResourceLoader
</prop>
</props>
diff --git a/idp-attribute-resolver-spring/src/test/resources/net/shibboleth/idp/attribute/resolver/spring/dc/http/spring-beans.xml b/idp-attribute-resolver-spring/src/test/resources/net/shibboleth/idp/attribute/resolver/spring/dc/http/spring-beans.xml
index 8f8019865..008a03ef4 100644
--- a/idp-attribute-resolver-spring/src/test/resources/net/shibboleth/idp/attribute/resolver/spring/dc/http/spring-beans.xml
+++ b/idp-attribute-resolver-spring/src/test/resources/net/shibboleth/idp/attribute/resolver/spring/dc/http/spring-beans.xml
@@ -36,11 +36,11 @@
<bean id="shibboleth.VelocityEngine" class="net.shibboleth.ext.spring.velocity.VelocityEngineFactoryBean">
<property name="velocityProperties">
<props>
- <prop key="resource.loader">classpath, string</prop>
- <prop key="classpath.resource.loader.class">
+ <prop key="resource.loaders">classpath, string</prop>
+ <prop key="resource.loader.classpath.class">
org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader
</prop>
- <prop key="string.resource.loader.class">
+ <prop key="resource.loader.string.class">
org.apache.velocity.runtime.resource.loader.StringResourceLoader
</prop>
</props>
diff --git a/idp-attribute-resolver-spring/src/test/resources/net/shibboleth/idp/attribute/resolver/spring/dc/storage/spring-beans.xml b/idp-attribute-resolver-spring/src/test/resources/net/shibboleth/idp/attribute/resolver/spring/dc/storage/spring-beans.xml
index 6034ae178..20d5b6205 100644
--- a/idp-attribute-resolver-spring/src/test/resources/net/shibboleth/idp/attribute/resolver/spring/dc/storage/spring-beans.xml
+++ b/idp-attribute-resolver-spring/src/test/resources/net/shibboleth/idp/attribute/resolver/spring/dc/storage/spring-beans.xml
@@ -11,11 +11,11 @@
<bean id="shibboleth.VelocityEngine" class="net.shibboleth.ext.spring.velocity.VelocityEngineFactoryBean">
<property name="velocityProperties">
<props>
- <prop key="resource.loader">classpath, string</prop>
- <prop key="classpath.resource.loader.class">
+ <prop key="resource.loaders">classpath, string</prop>
+ <prop key="resource.loader.classpath.class">
org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader
</prop>
- <prop key="string.resource.loader.class">
+ <prop key="resource.loader.string.class">
org.apache.velocity.runtime.resource.loader.StringResourceLoader
</prop>
</props>
diff --git a/idp-attribute-resolver-spring/src/test/resources/net/shibboleth/idp/attribute/resolver/spring/externalBeans.xml b/idp-attribute-resolver-spring/src/test/resources/net/shibboleth/idp/attribute/resolver/spring/externalBeans.xml
index 90240899d..0c4bf6ace 100644
--- a/idp-attribute-resolver-spring/src/test/resources/net/shibboleth/idp/attribute/resolver/spring/externalBeans.xml
+++ b/idp-attribute-resolver-spring/src/test/resources/net/shibboleth/idp/attribute/resolver/spring/externalBeans.xml
@@ -14,11 +14,11 @@
<bean id="shibboleth.VelocityEngine" class="net.shibboleth.ext.spring.velocity.VelocityEngineFactoryBean">
<property name="velocityProperties">
<props>
- <prop key="resource.loader">classpath, string</prop>
- <prop key="classpath.resource.loader.class">
+ <prop key="resource.loaders">classpath, string</prop>
+ <prop key="resource.loader.classpath.class">
org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader
</prop>
- <prop key="string.resource.loader.class">
+ <prop key="resource.loader.string.class">
org.apache.velocity.runtime.resource.loader.StringResourceLoader
</prop>
</props>
diff --git a/idp-attribute-resolver-spring/src/test/resources/net/shibboleth/idp/attribute/resolver/spring/mappedTemplateService.xml b/idp-attribute-resolver-spring/src/test/resources/net/shibboleth/idp/attribute/resolver/spring/mappedTemplateService.xml
index d982ffef5..f52557d8d 100644
--- a/idp-attribute-resolver-spring/src/test/resources/net/shibboleth/idp/attribute/resolver/spring/mappedTemplateService.xml
+++ b/idp-attribute-resolver-spring/src/test/resources/net/shibboleth/idp/attribute/resolver/spring/mappedTemplateService.xml
@@ -16,11 +16,11 @@
<bean id="shibboleth.VelocityEngine" class="net.shibboleth.ext.spring.velocity.VelocityEngineFactoryBean">
<property name="velocityProperties">
<props>
- <prop key="resource.loader">classpath, string</prop>
- <prop key="classpath.resource.loader.class">
+ <prop key="resource.loaders">classpath, string</prop>
+ <prop key="resource.loader.classpath.class">
org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader
</prop>
- <prop key="string.resource.loader.class">
+ <prop key="resource.loader.string.class">
org.apache.velocity.runtime.resource.loader.StringResourceLoader
</prop>
</props>
diff --git a/idp-attribute-resolver-spring/src/test/resources/net/shibboleth/idp/attribute/resolver/spring/mapperTest.xml b/idp-attribute-resolver-spring/src/test/resources/net/shibboleth/idp/attribute/resolver/spring/mapperTest.xml
index d24021489..74ec70bf8 100644
--- a/idp-attribute-resolver-spring/src/test/resources/net/shibboleth/idp/attribute/resolver/spring/mapperTest.xml
+++ b/idp-attribute-resolver-spring/src/test/resources/net/shibboleth/idp/attribute/resolver/spring/mapperTest.xml
@@ -18,11 +18,11 @@
<bean id="shibboleth.VelocityEngine" class="net.shibboleth.ext.spring.velocity.VelocityEngineFactoryBean">
<property name="velocityProperties">
<props>
- <prop key="resource.loader">classpath, string</prop>
- <prop key="classpath.resource.loader.class">
+ <prop key="resource.loaders">classpath, string</prop>
+ <prop key="resource.loader.classpath.class">
org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader
</prop>
- <prop key="string.resource.loader.class">
+ <prop key="resource.loader.string.class">
org.apache.velocity.runtime.resource.loader.StringResourceLoader
</prop>
</props>
diff --git a/idp-attribute-resolver-spring/src/test/resources/net/shibboleth/idp/attribute/resolver/spring/multiFileService.xml b/idp-attribute-resolver-spring/src/test/resources/net/shibboleth/idp/attribute/resolver/spring/multiFileService.xml
index 2ba0b5743..7013aa4db 100644
--- a/idp-attribute-resolver-spring/src/test/resources/net/shibboleth/idp/attribute/resolver/spring/multiFileService.xml
+++ b/idp-attribute-resolver-spring/src/test/resources/net/shibboleth/idp/attribute/resolver/spring/multiFileService.xml
@@ -9,13 +9,13 @@
class="net.shibboleth.ext.spring.velocity.VelocityEngineFactoryBean">
<property name="velocityProperties">
<props>
- <prop key="resource.loader">classpath, string</prop>
- <prop key="classpath.resource.loader.class">
- org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader
- </prop>
- <prop key="string.resource.loader.class">
- org.apache.velocity.runtime.resource.loader.StringResourceLoader
- </prop>
+ <prop key="resource.loaders">classpath, string</prop>
+ <prop key="resource.loader.classpath.class">
+ org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader
+ </prop>
+ <prop key="resource.loader.string.class">
+ org.apache.velocity.runtime.resource.loader.StringResourceLoader
+ </prop>
</props>
</property>
</bean>
diff --git a/idp-attribute-resolver-spring/src/test/resources/net/shibboleth/idp/attribute/resolver/spring/service.xml b/idp-attribute-resolver-spring/src/test/resources/net/shibboleth/idp/attribute/resolver/spring/service.xml
index 2c594187b..8dbd23f1b 100644
--- a/idp-attribute-resolver-spring/src/test/resources/net/shibboleth/idp/attribute/resolver/spring/service.xml
+++ b/idp-attribute-resolver-spring/src/test/resources/net/shibboleth/idp/attribute/resolver/spring/service.xml
@@ -16,11 +16,11 @@
<bean id="shibboleth.VelocityEngine" class="net.shibboleth.ext.spring.velocity.VelocityEngineFactoryBean">
<property name="velocityProperties">
<props>
- <prop key="resource.loader">classpath, string</prop>
- <prop key="classpath.resource.loader.class">
+ <prop key="resource.loaders">classpath, string</prop>
+ <prop key="resource.loader.classpath.class">
org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader
</prop>
- <prop key="string.resource.loader.class">
+ <prop key="resource.loader.string.class">
org.apache.velocity.runtime.resource.loader.StringResourceLoader
</prop>
</props>
diff --git a/idp-attribute-resolver-spring/src/test/resources/net/shibboleth/idp/attribute/resolver/spring/service2.xml b/idp-attribute-resolver-spring/src/test/resources/net/shibboleth/idp/attribute/resolver/spring/service2.xml
index fbf687839..47b47db36 100644
--- a/idp-attribute-resolver-spring/src/test/resources/net/shibboleth/idp/attribute/resolver/spring/service2.xml
+++ b/idp-attribute-resolver-spring/src/test/resources/net/shibboleth/idp/attribute/resolver/spring/service2.xml
@@ -9,13 +9,13 @@
class="net.shibboleth.ext.spring.velocity.VelocityEngineFactoryBean">
<property name="velocityProperties">
<props>
- <prop key="resource.loader">classpath, string</prop>
- <prop key="classpath.resource.loader.class">
- org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader
- </prop>
- <prop key="string.resource.loader.class">
- org.apache.velocity.runtime.resource.loader.StringResourceLoader
- </prop>
+ <prop key="resource.loaders">classpath, string</prop>
+ <prop key="resource.loader.classpath.class">
+ org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader
+ </prop>
+ <prop key="resource.loader.string.class">
+ org.apache.velocity.runtime.resource.loader.StringResourceLoader
+ </prop>
</props>
</property>
</bean>
diff --git a/idp-attribute-resolver-spring/src/test/resources/net/shibboleth/idp/attribute/resolver/spring/serviceNullStrip.xml b/idp-attribute-resolver-spring/src/test/resources/net/shibboleth/idp/attribute/resolver/spring/serviceNullStrip.xml
index 17724b8ea..d80de1c45 100644
--- a/idp-attribute-resolver-spring/src/test/resources/net/shibboleth/idp/attribute/resolver/spring/serviceNullStrip.xml
+++ b/idp-attribute-resolver-spring/src/test/resources/net/shibboleth/idp/attribute/resolver/spring/serviceNullStrip.xml
@@ -16,11 +16,11 @@
<bean id="shibboleth.VelocityEngine" class="net.shibboleth.ext.spring.velocity.VelocityEngineFactoryBean">
<property name="velocityProperties">
<props>
- <prop key="resource.loader">classpath, string</prop>
- <prop key="classpath.resource.loader.class">
+ <prop key="resource.loaders">classpath, string</prop>
+ <prop key="resource.loader.classpath.class">
org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader
</prop>
- <prop key="string.resource.loader.class">
+ <prop key="resource.loader.string.class">
org.apache.velocity.runtime.resource.loader.StringResourceLoader
</prop>
</props>
diff --git a/idp-attribute-resolver-spring/src/test/resources/net/shibboleth/idp/attribute/resolver/spring/velocity2.xml b/idp-attribute-resolver-spring/src/test/resources/net/shibboleth/idp/attribute/resolver/spring/velocity2.xml
index 3b8b5d457..72b495ae7 100644
--- a/idp-attribute-resolver-spring/src/test/resources/net/shibboleth/idp/attribute/resolver/spring/velocity2.xml
+++ b/idp-attribute-resolver-spring/src/test/resources/net/shibboleth/idp/attribute/resolver/spring/velocity2.xml
@@ -7,11 +7,11 @@
<bean id="otherVe" class="net.shibboleth.ext.spring.velocity.VelocityEngineFactoryBean">
<property name="velocityProperties">
<props>
- <prop key="resource.loader">classpath, string</prop>
- <prop key="classpath.resource.loader.class">
+ <prop key="resource.loaders">classpath, string</prop>
+ <prop key="resource.loader.classpath.class">
org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader
</prop>
- <prop key="string.resource.loader.class">
+ <prop key="resource.loader.string.class">
org.apache.velocity.runtime.resource.loader.StringResourceLoader
</prop>
</props>
diff --git a/idp-profile-spring/src/test/resources/net/shibboleth/idp/profile/spring/relyingparty/metadata/beans.xml b/idp-profile-spring/src/test/resources/net/shibboleth/idp/profile/spring/relyingparty/metadata/beans.xml
index 53c024208..ee524a3fe 100644
--- a/idp-profile-spring/src/test/resources/net/shibboleth/idp/profile/spring/relyingparty/metadata/beans.xml
+++ b/idp-profile-spring/src/test/resources/net/shibboleth/idp/profile/spring/relyingparty/metadata/beans.xml
@@ -31,11 +31,11 @@
<bean id="shibboleth.VelocityEngine" class="net.shibboleth.ext.spring.velocity.VelocityEngineFactoryBean">
<property name="velocityProperties">
<props>
- <prop key="resource.loader">classpath, string</prop>
- <prop key="classpath.resource.loader.class">
+ <prop key="resource.loaders">classpath, string</prop>
+ <prop key="resource.loader.classpath.class">
org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader
</prop>
- <prop key="string.resource.loader.class">
+ <prop key="resource.loader.string.class">
org.apache.velocity.runtime.resource.loader.StringResourceLoader
</prop>
</props>
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list