[java-shib-profile] branch main updated: Bit of cleanup.
Scott Cantor
cantor.2 at osu.edu
Tue Jul 23 15:34:38 UTC 2024
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=af9147bd8c84fc06cf26523ad2432d06c80e248d
The following commit(s) were added to refs/heads/main by this push:
new af9147b Bit of cleanup.
af9147b is described below
commit af9147bd8c84fc06cf26523ad2432d06c80e248d
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Tue Jul 23 11:34:35 2024 -0400
Bit of cleanup.
---
.../saml/profile/config/logic/SignRequestsPredicate.java | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
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 cefba54..7e2cdcf 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
@@ -77,7 +77,6 @@ public class SignRequestsPredicate extends AbstractRelyingPartyPredicate {
}
/** {@inheritDoc} */
-// Checkstyle: CyclomaticComplexity OFF
public boolean test(@Nullable final ProfileRequestContext input) {
boolean sso = false;
@@ -85,12 +84,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 (pc instanceof SAMLProfileConfiguration samlpc) {
+ if (samlpc.isSignRequests(input)) {
return true;
}
- if (pc instanceof BrowserSSOProfileConfiguration) {
+ if (samlpc instanceof BrowserSSOProfileConfiguration) {
sso = true;
}
}
@@ -100,8 +99,8 @@ public class SignRequestsPredicate extends AbstractRelyingPartyPredicate {
final SAMLMetadataContext metadataCtx = metadataContextLookupStrategy.apply(input);
if (metadataCtx != null) {
final RoleDescriptor role = metadataCtx.getRoleDescriptor();
- if (role instanceof IDPSSODescriptor) {
- final Boolean flag = ((IDPSSODescriptor) role).getWantAuthnRequestsSigned();
+ if (role instanceof IDPSSODescriptor idp) {
+ final Boolean flag = idp.getWantAuthnRequestsSigned();
if (flag != null && flag.booleanValue()) {
return true;
}
@@ -111,5 +110,5 @@ public class SignRequestsPredicate extends AbstractRelyingPartyPredicate {
return false;
}
-// Checkstyle: CyclomaticComplexity ON
+
}
\ No newline at end of file
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list