[java-identity-provider] 03/03: IDP-1623 ResolvedDataConnector#getResolvedAttributes() can return null.
Rod Widdowson
rdw at steadingsoftware.com
Mon Jun 22 15:56:27 UTC 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=9773c07e634f3e11d2d4780172f1b60840ce40f2
commit 9773c07e634f3e11d2d4780172f1b60840ce40f2
Author: Rod Widdowson <rdw at steadingsoftware.com>
AuthorDate: Mon Jun 22 16:54:59 2020 +0100
IDP-1623 ResolvedDataConnector#getResolvedAttributes() can return null.
https://issues.shibboleth.net/jira/browse/IDP-1623
---
.../idp/attribute/resolver/impl/AttributeResolverImpl.java | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/idp-attribute-resolver-impl/src/main/java/net/shibboleth/idp/attribute/resolver/impl/AttributeResolverImpl.java b/idp-attribute-resolver-impl/src/main/java/net/shibboleth/idp/attribute/resolver/impl/AttributeResolverImpl.java
index f44857a82..76a51c5f9 100644
--- a/idp-attribute-resolver-impl/src/main/java/net/shibboleth/idp/attribute/resolver/impl/AttributeResolverImpl.java
+++ b/idp-attribute-resolver-impl/src/main/java/net/shibboleth/idp/attribute/resolver/impl/AttributeResolverImpl.java
@@ -529,6 +529,7 @@ public class AttributeResolverImpl extends AbstractServiceableComponent<Attribut
* @param resolutionContext the context we are working in
* @param workContext context to extract attributes from
*/
+ // CheckStyle: CyclomaticComplexity OFF
private void collectExportingDataConnectors(final Map<String, IdPAttribute> resolvedAttributes,
final AttributeResolutionContext resolutionContext,
final AttributeResolverWorkContext workContext) {
@@ -539,7 +540,12 @@ public class AttributeResolverImpl extends AbstractServiceableComponent<Attribut
continue;
}
- for (final IdPAttribute attribute:dataConnector.getResolvedAttributes().values()) {
+ final Map<String, IdPAttribute> resolved = dataConnector.getResolvedAttributes();
+ if (resolved == null || resolved.isEmpty()) {
+ continue;
+ }
+
+ for (final IdPAttribute attribute:resolved.values()) {
if (!dataConnector.isExportAllAttributes() &&
!dataConnector.getExportAttributes().contains(attribute.getId())) {
continue;
@@ -562,6 +568,7 @@ public class AttributeResolverImpl extends AbstractServiceableComponent<Attribut
}
}
}
+ // CheckStyle: CyclomaticComplexity ON
/**
* Finalizes the set of resolved attributes and places them in the {@link AttributeResolutionContext}. The result of
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list