[java-shib-profile] branch main updated: Syntax cleanup.
Scott Cantor
cantor.2 at osu.edu
Tue Feb 28 17:29:06 UTC 2023
This is an automated email from the git hooks/post-receive script.
scantor pushed a commit to branch main
in repository java-shib-profile.
View the commit online:
http://git.shibboleth.net/view/?p=java-shib-profile.git;a=commit;h=24eda8497dacfbf10368c71f7dc2e7b068eb8323
The following commit(s) were added to refs/heads/main by this push:
new 24eda84 Syntax cleanup.
24eda84 is described below
commit 24eda8497dacfbf10368c71f7dc2e7b068eb8323
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Tue Feb 28 12:29:03 2023 -0500
Syntax cleanup.
---
.../config/logic/ResolveAttributesPredicate.java | 6 ++----
.../config/logic/NotBeforeProfileConfigPredicate.java | 4 +---
.../profile/config/logic/SignRequestsPredicate.java | 8 +++-----
.../profile/config/logic/SignResponsesPredicate.java | 6 ++----
.../messaging/ClientTLSArtifactRequestsPredicate.java | 6 ++----
.../logic/messaging/SignArtifactRequestsPredicate.java | 6 ++----
.../saml2/profile/config/SAML2ProfileConfiguration.java | 3 +--
.../profile/config/logic/CheckAddressPredicate.java | 6 ++----
.../config/logic/IgnoreRequestSignaturesPredicate.java | 17 ++++++-----------
.../messaging/ClientTLSSOAPLogoutRequestsPredicate.java | 6 ++----
.../messaging/SignSOAPLogoutRequestsPredicate.java | 6 ++----
.../navigate/MaximumTimeSinceAuthnLookupFunction.java | 6 ++----
.../config/navigate/ProxyCountLookupFunction.java | 6 ++----
.../navigate/QualifiedNameIDFormatsLookupFunction.java | 6 ++----
14 files changed, 31 insertions(+), 61 deletions(-)
diff --git a/shib-profile-api/src/main/java/net/shibboleth/profile/config/logic/ResolveAttributesPredicate.java b/shib-profile-api/src/main/java/net/shibboleth/profile/config/logic/ResolveAttributesPredicate.java
index d88ab29..7604bb9 100644
--- a/shib-profile-api/src/main/java/net/shibboleth/profile/config/logic/ResolveAttributesPredicate.java
+++ b/shib-profile-api/src/main/java/net/shibboleth/profile/config/logic/ResolveAttributesPredicate.java
@@ -20,7 +20,6 @@ package net.shibboleth.profile.config.logic;
import javax.annotation.Nullable;
import net.shibboleth.profile.config.AttributeResolvingProfileConfiguration;
-import net.shibboleth.profile.config.ProfileConfiguration;
import net.shibboleth.profile.context.RelyingPartyContext;
import net.shibboleth.profile.context.logic.AbstractRelyingPartyPredicate;
@@ -38,9 +37,8 @@ public class ResolveAttributesPredicate extends AbstractRelyingPartyPredicate {
if (input != null) {
final RelyingPartyContext rpc = getRelyingPartyContext(input);
if (rpc != null) {
- final ProfileConfiguration pc = rpc.getProfileConfig();
- if (pc instanceof AttributeResolvingProfileConfiguration) {
- return ((AttributeResolvingProfileConfiguration) pc).isResolveAttributes(input);
+ if (rpc.getProfileConfig() instanceof AttributeResolvingProfileConfiguration downcast) {
+ return downcast.isResolveAttributes(input);
}
}
}
diff --git a/shib-saml-profile-api/src/main/java/net/shibboleth/saml/profile/config/logic/NotBeforeProfileConfigPredicate.java b/shib-saml-profile-api/src/main/java/net/shibboleth/saml/profile/config/logic/NotBeforeProfileConfigPredicate.java
index 577d7cb..d7aedba 100644
--- a/shib-saml-profile-api/src/main/java/net/shibboleth/saml/profile/config/logic/NotBeforeProfileConfigPredicate.java
+++ b/shib-saml-profile-api/src/main/java/net/shibboleth/saml/profile/config/logic/NotBeforeProfileConfigPredicate.java
@@ -19,7 +19,6 @@ package net.shibboleth.saml.profile.config.logic;
import javax.annotation.Nullable;
-import net.shibboleth.profile.config.ProfileConfiguration;
import net.shibboleth.profile.context.RelyingPartyContext;
import net.shibboleth.profile.context.logic.AbstractRelyingPartyPredicate;
import net.shibboleth.saml.profile.config.SAMLAssertionProducingProfileConfiguration;
@@ -40,8 +39,7 @@ public class NotBeforeProfileConfigPredicate extends AbstractRelyingPartyPredica
public boolean test(@Nullable final ProfileRequestContext input) {
final RelyingPartyContext rpc = getRelyingPartyContext(input);
if (rpc != null) {
- final ProfileConfiguration pc = rpc.getProfileConfig();
- if (pc instanceof SAMLAssertionProducingProfileConfiguration downcast) {
+ if (rpc.getProfileConfig() instanceof SAMLAssertionProducingProfileConfiguration downcast) {
return downcast.isIncludeConditionsNotBefore(input);
}
}
diff --git a/shib-saml-profile-api/src/main/java/net/shibboleth/saml/profile/config/logic/SignRequestsPredicate.java b/shib-saml-profile-api/src/main/java/net/shibboleth/saml/profile/config/logic/SignRequestsPredicate.java
index 53bc2cf..8f7f2be 100644
--- a/shib-saml-profile-api/src/main/java/net/shibboleth/saml/profile/config/logic/SignRequestsPredicate.java
+++ b/shib-saml-profile-api/src/main/java/net/shibboleth/saml/profile/config/logic/SignRequestsPredicate.java
@@ -22,7 +22,6 @@ import java.util.function.Function;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
-import net.shibboleth.profile.config.ProfileConfiguration;
import net.shibboleth.profile.context.RelyingPartyContext;
import net.shibboleth.profile.context.logic.AbstractRelyingPartyPredicate;
import net.shibboleth.saml.profile.context.navigate.SAMLMetadataContextLookupFunction;
@@ -87,13 +86,12 @@ public class SignRequestsPredicate extends AbstractRelyingPartyPredicate {
final RelyingPartyContext rpc = getRelyingPartyContext(input);
if (rpc != null) {
- final ProfileConfiguration pc = rpc.getProfileConfig();
- if (pc instanceof SAMLProfileConfiguration) {
- if (((SAMLProfileConfiguration) pc).isSignRequests(input)) {
+ if (rpc.getProfileConfig() instanceof SAMLProfileConfiguration downcast) {
+ if (downcast.isSignRequests(input)) {
return true;
}
- if (pc instanceof BrowserSSOProfileConfiguration) {
+ if (downcast instanceof BrowserSSOProfileConfiguration) {
sso = true;
}
}
diff --git a/shib-saml-profile-api/src/main/java/net/shibboleth/saml/profile/config/logic/SignResponsesPredicate.java b/shib-saml-profile-api/src/main/java/net/shibboleth/saml/profile/config/logic/SignResponsesPredicate.java
index 01b6fc4..f214fa9 100644
--- a/shib-saml-profile-api/src/main/java/net/shibboleth/saml/profile/config/logic/SignResponsesPredicate.java
+++ b/shib-saml-profile-api/src/main/java/net/shibboleth/saml/profile/config/logic/SignResponsesPredicate.java
@@ -19,7 +19,6 @@ package net.shibboleth.saml.profile.config.logic;
import javax.annotation.Nullable;
-import net.shibboleth.profile.config.ProfileConfiguration;
import net.shibboleth.profile.context.RelyingPartyContext;
import net.shibboleth.profile.context.logic.AbstractRelyingPartyPredicate;
import net.shibboleth.saml.profile.config.SAMLProfileConfiguration;
@@ -34,9 +33,8 @@ public class SignResponsesPredicate extends AbstractRelyingPartyPredicate {
public boolean test(@Nullable final ProfileRequestContext input) {
final RelyingPartyContext rpc = getRelyingPartyContext(input);
if (rpc != null) {
- final ProfileConfiguration pc = rpc.getProfileConfig();
- if (pc instanceof SAMLProfileConfiguration) {
- return ((SAMLProfileConfiguration) pc).isSignResponses(input);
+ if (rpc.getProfileConfig() instanceof SAMLProfileConfiguration downcast) {
+ return downcast.isSignResponses(input);
}
}
diff --git a/shib-saml-profile-api/src/main/java/net/shibboleth/saml/profile/config/logic/messaging/ClientTLSArtifactRequestsPredicate.java b/shib-saml-profile-api/src/main/java/net/shibboleth/saml/profile/config/logic/messaging/ClientTLSArtifactRequestsPredicate.java
index 0d030cb..7e4c0bf 100644
--- a/shib-saml-profile-api/src/main/java/net/shibboleth/saml/profile/config/logic/messaging/ClientTLSArtifactRequestsPredicate.java
+++ b/shib-saml-profile-api/src/main/java/net/shibboleth/saml/profile/config/logic/messaging/ClientTLSArtifactRequestsPredicate.java
@@ -21,7 +21,6 @@ import javax.annotation.Nullable;
import org.opensaml.messaging.context.MessageContext;
-import net.shibboleth.profile.config.ProfileConfiguration;
import net.shibboleth.profile.context.RelyingPartyContext;
import net.shibboleth.profile.context.logic.messaging.AbstractRelyingPartyPredicate;
import net.shibboleth.saml.profile.config.SAMLArtifactConsumerProfileConfiguration;
@@ -34,9 +33,8 @@ public class ClientTLSArtifactRequestsPredicate extends AbstractRelyingPartyPred
public boolean test(@Nullable final MessageContext input) {
final RelyingPartyContext rpc = getRelyingPartyContext(input);
if (rpc != null) {
- final ProfileConfiguration pc = rpc.getProfileConfig();
- if (pc != null && pc instanceof SAMLArtifactConsumerProfileConfiguration) {
- return ((SAMLArtifactConsumerProfileConfiguration) pc).isClientTLSArtifactRequests(input);
+ if (rpc.getProfileConfig() instanceof SAMLArtifactConsumerProfileConfiguration art) {
+ return art.isClientTLSArtifactRequests(input);
}
}
diff --git a/shib-saml-profile-api/src/main/java/net/shibboleth/saml/profile/config/logic/messaging/SignArtifactRequestsPredicate.java b/shib-saml-profile-api/src/main/java/net/shibboleth/saml/profile/config/logic/messaging/SignArtifactRequestsPredicate.java
index 4c2e230..108aad7 100644
--- a/shib-saml-profile-api/src/main/java/net/shibboleth/saml/profile/config/logic/messaging/SignArtifactRequestsPredicate.java
+++ b/shib-saml-profile-api/src/main/java/net/shibboleth/saml/profile/config/logic/messaging/SignArtifactRequestsPredicate.java
@@ -21,7 +21,6 @@ import javax.annotation.Nullable;
import org.opensaml.messaging.context.MessageContext;
-import net.shibboleth.profile.config.ProfileConfiguration;
import net.shibboleth.profile.context.RelyingPartyContext;
import net.shibboleth.profile.context.logic.messaging.AbstractRelyingPartyPredicate;
import net.shibboleth.saml.profile.config.SAMLArtifactConsumerProfileConfiguration;
@@ -34,9 +33,8 @@ public class SignArtifactRequestsPredicate extends AbstractRelyingPartyPredicate
public boolean test(@Nullable final MessageContext input) {
final RelyingPartyContext rpc = getRelyingPartyContext(input);
if (rpc != null) {
- final ProfileConfiguration pc = rpc.getProfileConfig();
- if (pc != null && pc instanceof SAMLArtifactConsumerProfileConfiguration) {
- return ((SAMLArtifactConsumerProfileConfiguration) pc).isSignArtifactRequests(input);
+ if (rpc.getProfileConfig() instanceof SAMLArtifactConsumerProfileConfiguration art) {
+ return art.isSignArtifactRequests(input);
}
}
diff --git a/shib-saml-profile-api/src/main/java/net/shibboleth/saml/saml2/profile/config/SAML2ProfileConfiguration.java b/shib-saml-profile-api/src/main/java/net/shibboleth/saml/saml2/profile/config/SAML2ProfileConfiguration.java
index d724c9a..5099bba 100644
--- a/shib-saml-profile-api/src/main/java/net/shibboleth/saml/saml2/profile/config/SAML2ProfileConfiguration.java
+++ b/shib-saml-profile-api/src/main/java/net/shibboleth/saml/saml2/profile/config/SAML2ProfileConfiguration.java
@@ -17,7 +17,6 @@
package net.shibboleth.saml.saml2.profile.config;
-import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import org.opensaml.profile.context.ProfileRequestContext;
@@ -39,7 +38,7 @@ public interface SAML2ProfileConfiguration extends SAMLProfileConfiguration {
*
* @return true iff request signatures should be ignored
*/
- boolean isIgnoreRequestSignatures(@Nonnull final ProfileRequestContext profileRequestContext);
+ boolean isIgnoreRequestSignatures(@Nullable final ProfileRequestContext profileRequestContext);
/**
* Gets whether to ignore an inability to encrypt due to external factors.
diff --git a/shib-saml-profile-api/src/main/java/net/shibboleth/saml/saml2/profile/config/logic/CheckAddressPredicate.java b/shib-saml-profile-api/src/main/java/net/shibboleth/saml/saml2/profile/config/logic/CheckAddressPredicate.java
index 405847e..49867c7 100644
--- a/shib-saml-profile-api/src/main/java/net/shibboleth/saml/saml2/profile/config/logic/CheckAddressPredicate.java
+++ b/shib-saml-profile-api/src/main/java/net/shibboleth/saml/saml2/profile/config/logic/CheckAddressPredicate.java
@@ -19,7 +19,6 @@ package net.shibboleth.saml.saml2.profile.config.logic;
import javax.annotation.Nullable;
-import net.shibboleth.profile.config.ProfileConfiguration;
import net.shibboleth.profile.context.RelyingPartyContext;
import net.shibboleth.profile.context.logic.AbstractRelyingPartyPredicate;
import net.shibboleth.saml.saml2.profile.config.BrowserSSOProfileConfiguration;
@@ -41,9 +40,8 @@ public class CheckAddressPredicate extends AbstractRelyingPartyPredicate {
final RelyingPartyContext rpc = getRelyingPartyContext(input);
if (rpc != null) {
- final ProfileConfiguration pc = rpc.getProfileConfig();
- if (pc instanceof BrowserSSOProfileConfiguration) {
- return ((BrowserSSOProfileConfiguration) pc).isCheckAddress(input);
+ if (rpc.getProfileConfig() instanceof BrowserSSOProfileConfiguration sso) {
+ return sso.isCheckAddress(input);
}
}
diff --git a/shib-saml-profile-api/src/main/java/net/shibboleth/saml/saml2/profile/config/logic/IgnoreRequestSignaturesPredicate.java b/shib-saml-profile-api/src/main/java/net/shibboleth/saml/saml2/profile/config/logic/IgnoreRequestSignaturesPredicate.java
index cfb9117..4a6c67e 100644
--- a/shib-saml-profile-api/src/main/java/net/shibboleth/saml/saml2/profile/config/logic/IgnoreRequestSignaturesPredicate.java
+++ b/shib-saml-profile-api/src/main/java/net/shibboleth/saml/saml2/profile/config/logic/IgnoreRequestSignaturesPredicate.java
@@ -22,7 +22,6 @@ import javax.annotation.Nullable;
import org.opensaml.profile.context.ProfileRequestContext;
-import net.shibboleth.profile.config.ProfileConfiguration;
import net.shibboleth.profile.context.RelyingPartyContext;
import net.shibboleth.profile.context.logic.AbstractRelyingPartyPredicate;
import net.shibboleth.saml.saml2.profile.config.SAML2ProfileConfiguration;
@@ -40,18 +39,14 @@ public class IgnoreRequestSignaturesPredicate extends AbstractRelyingPartyPredic
public boolean test(@Nullable final ProfileRequestContext input) {
final RelyingPartyContext rpCtx = getRelyingPartyContext(input);
- if (input == null || rpCtx == null) {
- log.debug("No RelyingPartyContext found, assuming signatures should be checked");
- return false;
+ if (rpCtx != null) {
+ if (rpCtx.getProfileConfig() instanceof SAML2ProfileConfiguration downcast) {
+ return downcast.isIgnoreRequestSignatures(input);
+ }
}
- final ProfileConfiguration pc = rpCtx.getProfileConfig();
- if (!(pc instanceof SAML2ProfileConfiguration)) {
- log.debug("No SAML 2 profile configuration found, assuming signatures should be checked");
- return false;
- }
-
- return ((SAML2ProfileConfiguration) pc).isIgnoreRequestSignatures(input);
+ log.debug("No SAML 2 profile configuration found, assuming signatures should be checked");
+ return false;
}
}
\ No newline at end of file
diff --git a/shib-saml-profile-api/src/main/java/net/shibboleth/saml/saml2/profile/config/logic/messaging/ClientTLSSOAPLogoutRequestsPredicate.java b/shib-saml-profile-api/src/main/java/net/shibboleth/saml/saml2/profile/config/logic/messaging/ClientTLSSOAPLogoutRequestsPredicate.java
index 98de07f..18db057 100644
--- a/shib-saml-profile-api/src/main/java/net/shibboleth/saml/saml2/profile/config/logic/messaging/ClientTLSSOAPLogoutRequestsPredicate.java
+++ b/shib-saml-profile-api/src/main/java/net/shibboleth/saml/saml2/profile/config/logic/messaging/ClientTLSSOAPLogoutRequestsPredicate.java
@@ -21,7 +21,6 @@ import javax.annotation.Nullable;
import org.opensaml.messaging.context.MessageContext;
-import net.shibboleth.profile.config.ProfileConfiguration;
import net.shibboleth.profile.context.RelyingPartyContext;
import net.shibboleth.profile.context.logic.messaging.AbstractRelyingPartyPredicate;
import net.shibboleth.saml.saml2.profile.config.SingleLogoutProfileConfiguration;
@@ -34,9 +33,8 @@ public class ClientTLSSOAPLogoutRequestsPredicate extends AbstractRelyingPartyPr
public boolean test(@Nullable final MessageContext input) {
final RelyingPartyContext rpc = getRelyingPartyContext(input);
if (rpc != null) {
- final ProfileConfiguration pc = rpc.getProfileConfig();
- if (pc != null && pc instanceof SingleLogoutProfileConfiguration) {
- return ((SingleLogoutProfileConfiguration) pc).isClientTLSSOAPRequests(input);
+ if (rpc.getProfileConfig() instanceof SingleLogoutProfileConfiguration slo) {
+ return slo.isClientTLSSOAPRequests(input);
}
}
diff --git a/shib-saml-profile-api/src/main/java/net/shibboleth/saml/saml2/profile/config/logic/messaging/SignSOAPLogoutRequestsPredicate.java b/shib-saml-profile-api/src/main/java/net/shibboleth/saml/saml2/profile/config/logic/messaging/SignSOAPLogoutRequestsPredicate.java
index 654c2bf..5b1814a 100644
--- a/shib-saml-profile-api/src/main/java/net/shibboleth/saml/saml2/profile/config/logic/messaging/SignSOAPLogoutRequestsPredicate.java
+++ b/shib-saml-profile-api/src/main/java/net/shibboleth/saml/saml2/profile/config/logic/messaging/SignSOAPLogoutRequestsPredicate.java
@@ -21,7 +21,6 @@ import javax.annotation.Nullable;
import org.opensaml.messaging.context.MessageContext;
-import net.shibboleth.profile.config.ProfileConfiguration;
import net.shibboleth.profile.context.RelyingPartyContext;
import net.shibboleth.profile.context.logic.messaging.AbstractRelyingPartyPredicate;
import net.shibboleth.saml.saml2.profile.config.SingleLogoutProfileConfiguration;
@@ -34,9 +33,8 @@ public class SignSOAPLogoutRequestsPredicate extends AbstractRelyingPartyPredica
public boolean test(@Nullable final MessageContext input) {
final RelyingPartyContext rpc = getRelyingPartyContext(input);
if (rpc != null) {
- final ProfileConfiguration pc = rpc.getProfileConfig();
- if (pc != null && pc instanceof SingleLogoutProfileConfiguration) {
- return ((SingleLogoutProfileConfiguration) pc).isSignSOAPRequests(input);
+ if (rpc.getProfileConfig() instanceof SingleLogoutProfileConfiguration slo) {
+ return slo.isSignSOAPRequests(input);
}
}
diff --git a/shib-saml-profile-api/src/main/java/net/shibboleth/saml/saml2/profile/config/navigate/MaximumTimeSinceAuthnLookupFunction.java b/shib-saml-profile-api/src/main/java/net/shibboleth/saml/saml2/profile/config/navigate/MaximumTimeSinceAuthnLookupFunction.java
index d475737..34f110d 100644
--- a/shib-saml-profile-api/src/main/java/net/shibboleth/saml/saml2/profile/config/navigate/MaximumTimeSinceAuthnLookupFunction.java
+++ b/shib-saml-profile-api/src/main/java/net/shibboleth/saml/saml2/profile/config/navigate/MaximumTimeSinceAuthnLookupFunction.java
@@ -23,7 +23,6 @@ import javax.annotation.Nullable;
import org.opensaml.profile.context.ProfileRequestContext;
-import net.shibboleth.profile.config.ProfileConfiguration;
import net.shibboleth.profile.context.RelyingPartyContext;
import net.shibboleth.profile.context.navigate.AbstractRelyingPartyLookupFunction;
import net.shibboleth.saml.saml2.profile.config.BrowserSSOProfileConfiguration;
@@ -41,9 +40,8 @@ public class MaximumTimeSinceAuthnLookupFunction extends AbstractRelyingPartyLoo
@Nullable public Duration apply(@Nullable final ProfileRequestContext input) {
final RelyingPartyContext rpc = getRelyingPartyContextLookupStrategy().apply(input);
if (rpc != null) {
- final ProfileConfiguration pc = rpc.getProfileConfig();
- if (pc != null && pc instanceof BrowserSSOProfileConfiguration) {
- return ((BrowserSSOProfileConfiguration) pc).getMaximumTimeSinceAuthn(input);
+ if (rpc.getProfileConfig() instanceof BrowserSSOProfileConfiguration sso) {
+ return sso.getMaximumTimeSinceAuthn(input);
}
}
diff --git a/shib-saml-profile-api/src/main/java/net/shibboleth/saml/saml2/profile/config/navigate/ProxyCountLookupFunction.java b/shib-saml-profile-api/src/main/java/net/shibboleth/saml/saml2/profile/config/navigate/ProxyCountLookupFunction.java
index fa2ea18..ddbfd76 100644
--- a/shib-saml-profile-api/src/main/java/net/shibboleth/saml/saml2/profile/config/navigate/ProxyCountLookupFunction.java
+++ b/shib-saml-profile-api/src/main/java/net/shibboleth/saml/saml2/profile/config/navigate/ProxyCountLookupFunction.java
@@ -19,7 +19,6 @@ package net.shibboleth.saml.saml2.profile.config.navigate;
import javax.annotation.Nullable;
-import net.shibboleth.profile.config.ProfileConfiguration;
import net.shibboleth.profile.context.RelyingPartyContext;
import net.shibboleth.profile.context.navigate.AbstractRelyingPartyLookupFunction;
import net.shibboleth.saml.saml2.profile.config.BrowserSSOProfileConfiguration;
@@ -39,9 +38,8 @@ public class ProxyCountLookupFunction extends AbstractRelyingPartyLookupFunction
@Nullable public Integer apply(@Nullable final ProfileRequestContext input) {
final RelyingPartyContext rpc = getRelyingPartyContextLookupStrategy().apply(input);
if (rpc != null) {
- final ProfileConfiguration pc = rpc.getProfileConfig();
- if (pc instanceof BrowserSSOProfileConfiguration) {
- return ((BrowserSSOProfileConfiguration) pc).getProxyCount(input);
+ if (rpc.getProfileConfig() instanceof BrowserSSOProfileConfiguration sso) {
+ return sso.getProxyCount(input);
}
}
diff --git a/shib-saml-profile-api/src/main/java/net/shibboleth/saml/saml2/profile/config/navigate/QualifiedNameIDFormatsLookupFunction.java b/shib-saml-profile-api/src/main/java/net/shibboleth/saml/saml2/profile/config/navigate/QualifiedNameIDFormatsLookupFunction.java
index 0857c4b..48d555f 100644
--- a/shib-saml-profile-api/src/main/java/net/shibboleth/saml/saml2/profile/config/navigate/QualifiedNameIDFormatsLookupFunction.java
+++ b/shib-saml-profile-api/src/main/java/net/shibboleth/saml/saml2/profile/config/navigate/QualifiedNameIDFormatsLookupFunction.java
@@ -22,7 +22,6 @@ import java.util.Collections;
import javax.annotation.Nullable;
-import net.shibboleth.profile.config.ProfileConfiguration;
import net.shibboleth.profile.context.RelyingPartyContext;
import net.shibboleth.profile.context.navigate.AbstractRelyingPartyLookupFunction;
import net.shibboleth.saml.saml2.profile.config.SingleLogoutProfileConfiguration;
@@ -50,9 +49,8 @@ public class QualifiedNameIDFormatsLookupFunction extends AbstractRelyingPartyLo
@Nullable final ProfileRequestContext input) {
final RelyingPartyContext rpc = getRelyingPartyContextLookupStrategy().apply(input);
if (rpc != null) {
- final ProfileConfiguration pc = rpc.getProfileConfig();
- if (pc != null && pc instanceof SingleLogoutProfileConfiguration) {
- return ((SingleLogoutProfileConfiguration) pc).getQualifiedNameIDFormats(input);
+ if (rpc.getProfileConfig() instanceof SingleLogoutProfileConfiguration slo) {
+ return slo.getQualifiedNameIDFormats(input);
}
}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list