[java-identity-provider] 03/04: IDP-1516 Remove @nullelements annotation
Rod Widdowson
rdw at steadingsoftware.com
Wed Oct 30 07:35:28 EDT 2019
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=e7798641398bb746d1cd9b0aebb33bcf95bcb30f
commit e7798641398bb746d1cd9b0aebb33bcf95bcb30f
Author: Rod Widdowson <rdw at steadingsoftware.com>
AuthorDate: Tue Oct 29 16:51:28 2019 +0000
IDP-1516 Remove @nullelements annotation
https://issues.shibboleth.net/jira/browse/IDP-1516
---
.../attribute/resolver/context/AttributeResolutionContext.java | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/idp-attribute-resolver-api/src/main/java/net/shibboleth/idp/attribute/resolver/context/AttributeResolutionContext.java b/idp-attribute-resolver-api/src/main/java/net/shibboleth/idp/attribute/resolver/context/AttributeResolutionContext.java
index e34f3fb..ad456d5 100644
--- a/idp-attribute-resolver-api/src/main/java/net/shibboleth/idp/attribute/resolver/context/AttributeResolutionContext.java
+++ b/idp-attribute-resolver-api/src/main/java/net/shibboleth/idp/attribute/resolver/context/AttributeResolutionContext.java
@@ -301,15 +301,13 @@ public final class AttributeResolutionContext extends BaseContext {
* @return this context
*/
@Nullable public AttributeResolutionContext setResolvedIdPAttributes(
- @Nullable @NullableElements final Collection<IdPAttribute> attributes) {
+ @Nullable final Collection<IdPAttribute> attributes) {
- final Map<String,IdPAttribute> copy = new HashMap<>();
+ final Map<String,IdPAttribute> copy = new HashMap<>(attributes.size());
if (attributes != null) {
for (final IdPAttribute attribute : attributes) {
- if (attribute != null) {
- copy.put(attribute.getId(), attribute);
- }
+ copy.put(attribute.getId(), Constraint.isNotNull(attribute, "Resolved Attributes Cannot be null"));
}
}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list