[java-identity-provider] branch master updated: IDP-1532 Info (rather than WARN) on empty transcoder files.

Rod Widdowson rdw at steadingsoftware.com
Mon Jan 20 11:32:27 EST 2020


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

rdw pushed a commit to branch master
in repository java-identity-provider.

View the commit online:
http://git.shibboleth.net/view/?p=java-identity-provider.git;a=commit;h=e6c9b606ef2da260643799835241d311488c6dd3

The following commit(s) were added to refs/heads/master by this push:
       new  e6c9b60   IDP-1532  Info (rather than WARN) on empty transcoder files.
e6c9b60 is described below

commit e6c9b606ef2da260643799835241d311488c6dd3
Author: Rod Widdowson <rdw at steadingsoftware.com>
AuthorDate: Mon Jan 20 16:30:52 2020 +0000

    IDP-1532  Info (rather than WARN) on empty transcoder files.
    
    https://issues.shibboleth.net/jira/browse/IDP-1532
---
 .../idp/attribute/transcoding/impl/TranscodingRuleLoader.java      | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/idp-attribute-impl/src/main/java/net/shibboleth/idp/attribute/transcoding/impl/TranscodingRuleLoader.java b/idp-attribute-impl/src/main/java/net/shibboleth/idp/attribute/transcoding/impl/TranscodingRuleLoader.java
index a043018..ad3451c 100644
--- a/idp-attribute-impl/src/main/java/net/shibboleth/idp/attribute/transcoding/impl/TranscodingRuleLoader.java
+++ b/idp-attribute-impl/src/main/java/net/shibboleth/idp/attribute/transcoding/impl/TranscodingRuleLoader.java
@@ -78,7 +78,12 @@ public class TranscodingRuleLoader {
                 } else {
                     log.debug("Loading rule from property set in file ({})", file);
                     try {
-                        rules.add(TranscodingRule.fromResource(new FileSystemResource(file)));
+                        final TranscodingRule rule = TranscodingRule.fromResource(new FileSystemResource(file));
+                        if (rule.getMap().isEmpty()) {
+                            log.info("Transcoding file {} contained no rules", child);
+                        } else {
+                            rules.add(rule);
+                        }
                     } catch (final IOException e) {
                         log.error("Failed to load rule from file ({})", file, e);
                     }

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


More information about the commits mailing list