[java-identity-provider] branch main updated: Fix warnings.

Scott Cantor cantor.2 at osu.edu
Mon May 8 13:47:00 UTC 2023


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

scantor pushed a commit to branch main
in repository java-identity-provider.

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

The following commit(s) were added to refs/heads/main by this push:
     new f7578869d Fix warnings.
f7578869d is described below

commit f7578869dab9ff89653c44754a9e4a52d124ae2c
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Mon May 8 09:46:56 2023 -0400

    Fix warnings.
---
 .../idp/authn/impl/ValidateExternalAuthentication.java     | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/idp-authn-impl/src/main/java/net/shibboleth/idp/authn/impl/ValidateExternalAuthentication.java b/idp-authn-impl/src/main/java/net/shibboleth/idp/authn/impl/ValidateExternalAuthentication.java
index c5a0a9f54..9007cb0af 100644
--- a/idp-authn-impl/src/main/java/net/shibboleth/idp/authn/impl/ValidateExternalAuthentication.java
+++ b/idp-authn-impl/src/main/java/net/shibboleth/idp/authn/impl/ValidateExternalAuthentication.java
@@ -229,6 +229,7 @@ public class ValidateExternalAuthentication extends AbstractAuditingValidationAc
             authenticationContext.setResultCacheable(false);
         }
         
+        assert extContext != null;
         filterAttributes(extContext);
         
         buildAuthenticationResult(profileRequestContext, authenticationContext);
@@ -252,17 +253,21 @@ public class ValidateExternalAuthentication extends AbstractAuditingValidationAc
         // Override supplied Subject with our own, after transferring over any custom Principals
         // and adding any filtered inbound attributes.
         assert isPreExecuteCalled();
-        final Subject localSubject = Constraint.isNotNull(extContext.getSubject(), "external Authn Subject cannot be null");
+        final Subject localSubject =
+                Constraint.isNotNull(extContext.getSubject(), "external Authn Subject cannot be null");
         localSubject.getPrincipals().addAll(subject.getPrincipals());
 
-        final AttributeContext ac= attributeContext;
+        final AttributeContext ac = attributeContext;
         if (ac != null && !ac.getIdPAttributes().isEmpty()) {
             log.debug("{} Adding filtered inbound attributes to Subject", getLogPrefix());
             localSubject.getPrincipals().addAll(
                 ac.getIdPAttributes().
                 values().
                 stream().
-                map((IdPAttribute a) -> {assert a != null;return new IdPAttributePrincipal(a);}).
+                map((IdPAttribute a) -> {
+                    assert a != null;
+                    return new IdPAttributePrincipal(a);
+                    }).
                 collect(CollectionSupport.nonnullCollector(Collectors.toList())).get());
         }
         
@@ -339,11 +344,12 @@ public class ValidateExternalAuthentication extends AbstractAuditingValidationAc
      */
     private void filterAttributes(@Nonnull final ExternalAuthenticationContext localExtContext) {
         
-        final AttributeContext ac = attributeContext = localExtContext.getSubcontext(AttributeContext.class);
+        final AttributeContext ac = localExtContext.getSubcontext(AttributeContext.class);
         if (ac == null) {
             log.debug("{} No attribute context, no attributes to filter", getLogPrefix());
             return;
         }
+        attributeContext = ac;
 
         if (ac.getIdPAttributes().isEmpty()) {
             log.debug("{} No attributes to filter", getLogPrefix());

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


More information about the commits mailing list