[java-identity-provider] 03/04: IDP-2069 Null Handling
Rod Widdowson
rdw at steadingsoftware.com
Wed Mar 15 13:38:39 UTC 2023
This is an automated email from the git hooks/post-receive script.
rdw 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=b2539ed433bd681e2f68218dae70ee56226f1451
commit b2539ed433bd681e2f68218dae70ee56226f1451
Author: Rod Widdowson <rdw at steadingsoftware.com>
AuthorDate: Tue Mar 14 10:30:27 2023 +0000
IDP-2069 Null Handling
https://shibboleth.atlassian.net/browse/IDP-2069
Remove several warnings from idp-authn-impl
---
.../net/shibboleth/idp/authn/impl/LDAPCredentialValidatorTest.java | 5 +++--
.../idp/authn/impl/PreserveAuthenticationFlowStateTest.java | 2 --
.../test/java/net/shibboleth/idp/authn/impl/X509ProxyFilterTest.java | 2 ++
3 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/idp-authn-impl/src/test/java/net/shibboleth/idp/authn/impl/LDAPCredentialValidatorTest.java b/idp-authn-impl/src/test/java/net/shibboleth/idp/authn/impl/LDAPCredentialValidatorTest.java
index f1fc08324..09656f680 100644
--- a/idp-authn-impl/src/test/java/net/shibboleth/idp/authn/impl/LDAPCredentialValidatorTest.java
+++ b/idp-authn-impl/src/test/java/net/shibboleth/idp/authn/impl/LDAPCredentialValidatorTest.java
@@ -412,10 +412,10 @@ public class LDAPCredentialValidatorTest extends BaseAuthenticationContextTest {
AuthenticationResultCode.AUTHENTICATION_HANDLER_SUCCESS);
AuthenticationErrorContext aec = ac.getSubcontext(AuthenticationErrorContext.class);
+ Assert.assertNull(aec);
AuthenticationWarningContext awc = ac.getSubcontext(AuthenticationWarningContext.class);
assert awc != null && result != null;
-
ActionTestingSupport.assertEvent(event, "ExpiredPassword");
Assert.assertEquals(awc.getClassifiedWarnings().size(), 1);
Assert.assertTrue(awc.isClassifiedWarning("ExpiredPassword"));
@@ -674,8 +674,9 @@ public class LDAPCredentialValidatorTest extends BaseAuthenticationContextTest {
ActionTestingSupport.assertProceedEvent(event);
AuthenticationErrorContext aec = ac.getSubcontext(AuthenticationErrorContext.class);
+ Assert.assertNull(aec);
AuthenticationResult result = ac.getAuthenticationResult();
- assert result != null;
+ assert result != null ;
LDAPResponseContext lrc = ac.getSubcontext(LDAPResponseContext.class);
assert lrc != null;
final AuthenticationResponse lar = lrc.getAuthenticationResponse();
diff --git a/idp-authn-impl/src/test/java/net/shibboleth/idp/authn/impl/PreserveAuthenticationFlowStateTest.java b/idp-authn-impl/src/test/java/net/shibboleth/idp/authn/impl/PreserveAuthenticationFlowStateTest.java
index dd29ad0ce..f7e70c8ad 100644
--- a/idp-authn-impl/src/test/java/net/shibboleth/idp/authn/impl/PreserveAuthenticationFlowStateTest.java
+++ b/idp-authn-impl/src/test/java/net/shibboleth/idp/authn/impl/PreserveAuthenticationFlowStateTest.java
@@ -18,8 +18,6 @@
package net.shibboleth.idp.authn.impl;
-import static org.testng.Assert.assertTrue;
-
import java.util.Arrays;
import java.util.Map;
diff --git a/idp-authn-impl/src/test/java/net/shibboleth/idp/authn/impl/X509ProxyFilterTest.java b/idp-authn-impl/src/test/java/net/shibboleth/idp/authn/impl/X509ProxyFilterTest.java
index 7143b5c2d..97f47f22f 100644
--- a/idp-authn-impl/src/test/java/net/shibboleth/idp/authn/impl/X509ProxyFilterTest.java
+++ b/idp-authn-impl/src/test/java/net/shibboleth/idp/authn/impl/X509ProxyFilterTest.java
@@ -150,6 +150,7 @@ public class X509ProxyFilterTest extends BaseAuthenticationContextTest {
Assert.assertNull(request.getAttribute("jakarta.servlet.request.X509Certificate"));
}
+ @SuppressWarnings("deprecation")
@Test public void testEntityCertificate() throws IOException, ServletException {
request.addHeader("SSL_CLIENT_CERT", entityCertBase64);
@@ -164,6 +165,7 @@ public class X509ProxyFilterTest extends BaseAuthenticationContextTest {
((X509Certificate[]) request.getAttribute("jakarta.servlet.request.X509Certificate"))[0].getSubjectDN().toString());
}
+ @SuppressWarnings("deprecation")
@Test public void testCertificateChain() throws IOException, ServletException {
request.addHeader("SSL_CLIENT_CERT", entityCertBase64);
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list