[java-shib-attribute] branch main updated: IDP-1806 - Trailing Blank in property yields inconsistent error

Scott Cantor cantor.2 at osu.edu
Thu Jun 15 18:21:37 UTC 2023


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

scantor pushed a commit to branch main
in repository java-shib-attribute.

View the commit online:
http://git.shibboleth.net/view/?p=java-shib-attribute.git;a=commit;h=07f83898f46569402e7c81935025d6d5c0e1072b

The following commit(s) were added to refs/heads/main by this push:
     new 07f83898f IDP-1806 - Trailing Blank in property yields inconsistent error
07f83898f is described below

commit 07f83898f46569402e7c81935025d6d5c0e1072b
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Thu Jun 15 14:21:34 2023 -0400

    IDP-1806 - Trailing Blank in property yields inconsistent error
    
    https://shibboleth.atlassian.net/browse/IDP-1806
    
    Switch rule loader over to our Resource interface.
---
 .../net/shibboleth/idp/attribute/transcoding/TranscodingRule.java     | 3 +--
 .../idp/attribute/transcoding/impl/TranscodingRuleLoader.java         | 4 +++-
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/shib-attribute-api/src/main/java/net/shibboleth/idp/attribute/transcoding/TranscodingRule.java b/shib-attribute-api/src/main/java/net/shibboleth/idp/attribute/transcoding/TranscodingRule.java
index fc5a0940f..a3595270a 100644
--- a/shib-attribute-api/src/main/java/net/shibboleth/idp/attribute/transcoding/TranscodingRule.java
+++ b/shib-attribute-api/src/main/java/net/shibboleth/idp/attribute/transcoding/TranscodingRule.java
@@ -28,8 +28,6 @@ import java.util.Properties;
 import javax.annotation.Nonnull;
 import javax.annotation.Nullable;
 
-import org.springframework.core.io.Resource;
-
 import com.google.common.collect.ImmutableMap;
 
 import net.shibboleth.idp.attribute.IdPAttribute;
@@ -39,6 +37,7 @@ import net.shibboleth.shared.annotation.constraint.NotEmpty;
 import net.shibboleth.shared.annotation.constraint.NotLive;
 import net.shibboleth.shared.annotation.constraint.Unmodifiable;
 import net.shibboleth.shared.primitive.StringSupport;
+import net.shibboleth.shared.resource.Resource;
 
 /**
  * Wrapper around a {@link Map} representing a rule for transcoding, used to
diff --git a/shib-attribute-impl/src/main/java/net/shibboleth/idp/attribute/transcoding/impl/TranscodingRuleLoader.java b/shib-attribute-impl/src/main/java/net/shibboleth/idp/attribute/transcoding/impl/TranscodingRuleLoader.java
index c5a0974d5..16b935cec 100644
--- a/shib-attribute-impl/src/main/java/net/shibboleth/idp/attribute/transcoding/impl/TranscodingRuleLoader.java
+++ b/shib-attribute-impl/src/main/java/net/shibboleth/idp/attribute/transcoding/impl/TranscodingRuleLoader.java
@@ -41,6 +41,7 @@ import net.shibboleth.shared.collection.CollectionSupport;
 import net.shibboleth.shared.logic.Constraint;
 import net.shibboleth.shared.logic.PredicateSupport;
 import net.shibboleth.shared.primitive.LoggerFactory;
+import net.shibboleth.shared.spring.resource.ResourceHelper;
 
 /**
  * A mechanism for loading a set of {@link TranscodingRule} objects from sources such as maps
@@ -88,7 +89,8 @@ public class TranscodingRuleLoader {
                         PredicateSupport.anyMatch((String ext) -> file.getName().endsWith(ext)).test(extensions)) {
                     log.debug("Loading rule from property set in file ({})", file);
                     try {
-                        final TranscodingRule rule = TranscodingRule.fromResource(new FileSystemResource(file));
+                        final TranscodingRule rule =
+                                TranscodingRule.fromResource(ResourceHelper.of(new FileSystemResource(file)));
                         if (rule.getMap().isEmpty()) {
                             log.info("Transcoding file {} contained no rules", child);
                         } else {

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


More information about the commits mailing list