diff --git a/saml2/saml2-service-provider/src/main/java/org/springframework/security/saml2/provider/service/registration/InMemoryRelyingPartyRegistrationRepository.java b/saml2/saml2-service-provider/src/main/java/org/springframework/security/saml2/provider/service/registration/InMemoryRelyingPartyRegistrationRepository.java index 495c86123b..ce02633177 100644 --- a/saml2/saml2-service-provider/src/main/java/org/springframework/security/saml2/provider/service/registration/InMemoryRelyingPartyRegistrationRepository.java +++ b/saml2/saml2-service-provider/src/main/java/org/springframework/security/saml2/provider/service/registration/InMemoryRelyingPartyRegistrationRepository.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2019 the original author or authors. + * Copyright 2002-2021 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -48,7 +48,7 @@ public class InMemoryRelyingPartyRegistrationRepository for (RelyingPartyRegistration rp : rps) { Assert.notNull(rp, "relying party collection cannot contain null values"); String key = rp.getRegistrationId(); - Assert.notNull(rp, "relying party identifier cannot be null"); + Assert.notNull(key, "relying party identifier cannot be null"); Assert.isNull(result.get(key), () -> "relying party duplicate identifier '" + key + "' detected."); result.put(key, rp); }