[java-opensaml] branch main updated: Fix null bug in tests.

Scott Cantor cantor.2 at osu.edu
Mon Mar 17 19:38:06 UTC 2025


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

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

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

The following commit(s) were added to refs/heads/main by this push:
     new a90006057 Fix null bug in tests.
a90006057 is described below

commit a900060572c43b04034c3e98816e4ca522860fa6
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Mon Mar 17 15:38:03 2025 -0400

    Fix null bug in tests.
---
 .../impl/HttpServletRequestParametersValidationHandlerTest.java    | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/opensaml-messaging-impl/src/test/java/org/opensaml/messaging/handler/impl/HttpServletRequestParametersValidationHandlerTest.java b/opensaml-messaging-impl/src/test/java/org/opensaml/messaging/handler/impl/HttpServletRequestParametersValidationHandlerTest.java
index ad8dc64ac..8a808e07c 100644
--- a/opensaml-messaging-impl/src/test/java/org/opensaml/messaging/handler/impl/HttpServletRequestParametersValidationHandlerTest.java
+++ b/opensaml-messaging-impl/src/test/java/org/opensaml/messaging/handler/impl/HttpServletRequestParametersValidationHandlerTest.java
@@ -196,8 +196,11 @@ public class HttpServletRequestParametersValidationHandlerTest {
             List<Pair<String, String[]>> requestParams, boolean valid) throws Exception{
 
         MockHttpServletRequest request = new MockHttpServletRequest();
-        for (Pair<String,String[]> requestParam : requestParams) {
-            request.addParameter(requestParam.getFirst(), requestParam.getSecond()); 
+        for (final Pair<String,String[]> requestParam : requestParams) {
+            final String first = requestParam.getFirst();
+            final String[] second = requestParam.getSecond();
+            assert first != null && second != null;
+            request.addParameter(first, second); 
         }
 
         handler.setHttpServletRequestSupplier(() -> request);

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


More information about the commits mailing list