[java-plugin-shibd] branch main updated: Checkstyle.

Codeberg noreply at shibboleth.net
Thu May 7 14:43:14 UTC 2026


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

codeberg pushed a commit to branch main
in repository java-plugin-shibd.

View the commit online:
https://codeberg.org/Shibboleth/java-plugin-shibd/commit/41665b1feb0d3a239b82200311860a285ffa803d

The following commit(s) were added to refs/heads/main by this push:
     new 41665b1  Checkstyle.
41665b1 is described below

commit 41665b1feb0d3a239b82200311860a285ffa803d
Author: Scott Cantor <scott at restingparrotsoftware.com>
AuthorDate: Thu May 7 10:42:59 2026 -0400

    Checkstyle.
---
 .../context/logic/HttpServletRequestPredicate.java |  2 +-
 .../shibboleth/sp/state/AbstractStateManager.java  |  2 +-
 .../test/java/net/shibboleth/sp/ddf/DDFTest.java   | 48 +++++++++++-----------
 .../shibboleth/sp/impl/DefaultAgentResolver.java   |  1 +
 .../sp/profile/impl/DecodeAgentRequest.java        |  6 +--
 .../sp/state/impl/CookieStateManagerTest.java      |  1 +
 .../state/impl/StorageServiceStateManagerTest.java |  1 +
 7 files changed, 30 insertions(+), 31 deletions(-)

diff --git a/sp-server-api/src/main/java/net/shibboleth/sp/profile/context/logic/HttpServletRequestPredicate.java b/sp-server-api/src/main/java/net/shibboleth/sp/profile/context/logic/HttpServletRequestPredicate.java
index 0b8dfb3..5c79f85 100644
--- a/sp-server-api/src/main/java/net/shibboleth/sp/profile/context/logic/HttpServletRequestPredicate.java
+++ b/sp-server-api/src/main/java/net/shibboleth/sp/profile/context/logic/HttpServletRequestPredicate.java
@@ -17,11 +17,11 @@ package net.shibboleth.sp.profile.context.logic;
 import java.util.function.Predicate;
 
 import javax.annotation.Nonnull;
+import javax.annotation.Nullable;
 
 import org.opensaml.profile.context.ProfileRequestContext;
 import org.slf4j.Logger;
 
-import io.micrometer.common.lang.Nullable;
 import jakarta.servlet.ServletException;
 import jakarta.servlet.http.HttpServletRequest;
 import net.shibboleth.shared.annotation.constraint.NonnullAfterInit;
diff --git a/sp-server-api/src/main/java/net/shibboleth/sp/state/AbstractStateManager.java b/sp-server-api/src/main/java/net/shibboleth/sp/state/AbstractStateManager.java
index 3cac4ab..26ccc79 100644
--- a/sp-server-api/src/main/java/net/shibboleth/sp/state/AbstractStateManager.java
+++ b/sp-server-api/src/main/java/net/shibboleth/sp/state/AbstractStateManager.java
@@ -297,7 +297,7 @@ public abstract class AbstractStateManager extends AbstractIdentifiableInitializ
      * <p>The implementation should ensure when possible that this method works only once for a given state token.</p>
      * 
      * <p>Subclasses may assume that the state token inputs they receive will have been returned by them
-     * via the {@link #doPreserve(Agent, Application, String)} method.</p>
+     * via the {@link #doPreserve(Agent, Application, String, boolean)} method.</p>
      * 
      * @param agent agent owning the state
      * @param application application owning the state
diff --git a/sp-server-api/src/test/java/net/shibboleth/sp/ddf/DDFTest.java b/sp-server-api/src/test/java/net/shibboleth/sp/ddf/DDFTest.java
index 6452918..8444abb 100644
--- a/sp-server-api/src/test/java/net/shibboleth/sp/ddf/DDFTest.java
+++ b/sp-server-api/src/test/java/net/shibboleth/sp/ddf/DDFTest.java
@@ -21,14 +21,12 @@ import java.io.ByteArrayOutputStream;
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.UnsupportedEncodingException;
+import java.nio.charset.StandardCharsets;
 
 import javax.annotation.Nonnull;
 
 import org.testng.annotations.Test;
 
-import net.shibboleth.shared.collection.Pair;
-
-
 /**
  * DDF unit tests.
  */
@@ -182,19 +180,19 @@ public class DDFTest {
     @Test
     public void testEncoder() throws IOException {
         try (final ByteArrayOutputStream sink = new ByteArrayOutputStream()) {
-            DDF.encode(sink, "foo".getBytes("UTF8"));
+            DDF.encode(sink, "foo".getBytes(StandardCharsets.UTF_8));
             assertEquals(sink.toString(), "foo");
             sink.reset();
             
-            DDF.encode(sink, "foo bar".getBytes("UTF8"));
+            DDF.encode(sink, "foo bar".getBytes(StandardCharsets.UTF_8));
             assertEquals(sink.toString(), "foo%20bar");
             sink.reset();
             
-            DDF.encode(sink, "foo\nbar".getBytes("UTF8"));
+            DDF.encode(sink, "foo\nbar".getBytes(StandardCharsets.UTF_8));
             assertEquals(sink.toString(), "foo%0Abar");
             sink.reset();
             
-            DDF.encode(sink, "foo☯️bar".getBytes("UTF8"));
+            DDF.encode(sink, "foo☯️bar".getBytes(StandardCharsets.UTF_8));
             assertEquals(sink.toString(), "foo%E2%98%AF%EF%B8%8Fbar");
             sink.reset();
             
@@ -203,7 +201,7 @@ public class DDFTest {
             // will preserve the original 0x80 hex value in that position in the string
             // rather than converting through the UTF-8 representation.
             final byte[] unsafe = {102, 111, 111, -128, 98, 97, 114};
-            DDF.encode(sink, new String(unsafe, "ISO-8859-1").getBytes("ISO-8859-1"));
+            DDF.encode(sink, new String(unsafe, StandardCharsets.ISO_8859_1).getBytes(StandardCharsets.ISO_8859_1));
             assertEquals(sink.toString(), "foo%80bar");
             sink.reset();
         }
@@ -349,119 +347,119 @@ public class DDFTest {
     
     @Test
     public void testBadInputs() {
-        try (final InputStream is = new ByteArrayInputStream(new String().getBytes("UTF-8"))) {
+        try (final InputStream is = new ByteArrayInputStream(new String().getBytes(StandardCharsets.UTF_8))) {
             DDF.deserialize(is);
             fail("Should have thrown IOException");
         } catch (final IOException e) {
             
         }
 
-        try (final InputStream is = new ByteArrayInputStream(new String("\n").getBytes("UTF-8"))) {
+        try (final InputStream is = new ByteArrayInputStream(new String("\n").getBytes(StandardCharsets.UTF_8))) {
             DDF.deserialize(is);
             fail("Should have thrown IOException");
         } catch (final IOException e) {
             
         }
 
-        try (final InputStream is = new ByteArrayInputStream(new String(" ").getBytes("UTF-8"))) {
+        try (final InputStream is = new ByteArrayInputStream(new String(" ").getBytes(StandardCharsets.UTF_8))) {
             DDF.deserialize(is);
             fail("Should have thrown IOException");
         } catch (final IOException e) {
             
         }
 
-        try (final InputStream is = new ByteArrayInputStream(new String(".\n").getBytes("UTF-8"))) {
+        try (final InputStream is = new ByteArrayInputStream(new String(".\n").getBytes(StandardCharsets.UTF_8))) {
             DDF.deserialize(is);
             fail("Should have thrown IOException");
         } catch (final IOException e) {
             
         }
 
-        try (final InputStream is = new ByteArrayInputStream(new String(". \n").getBytes("UTF-8"))) {
+        try (final InputStream is = new ByteArrayInputStream(new String(". \n").getBytes(StandardCharsets.UTF_8))) {
             DDF.deserialize(is);
             fail("Should have thrown IOException");
         } catch (final IOException e) {
             
         }
 
-        try (final InputStream is = new ByteArrayInputStream(new String(". -2").getBytes("UTF-8"))) {
+        try (final InputStream is = new ByteArrayInputStream(new String(". -2").getBytes(StandardCharsets.UTF_8))) {
             DDF.deserialize(is);
             fail("Should have thrown IOException");
         } catch (final IOException e) {
             
         }
 
-        try (final InputStream is = new ByteArrayInputStream(new String(". 0 \n").getBytes("UTF-8"))) {
+        try (final InputStream is = new ByteArrayInputStream(new String(". 0 \n").getBytes(StandardCharsets.UTF_8))) {
             DDF.deserialize(is);
             fail("Should have thrown IOException");
         } catch (final IOException e) {
             
         }
 
-        try (final InputStream is = new ByteArrayInputStream(new String(". 1 foo \n").getBytes("UTF-8"))) {
+        try (final InputStream is = new ByteArrayInputStream(new String(". 1 foo \n").getBytes(StandardCharsets.UTF_8))) {
             DDF.deserialize(is);
             fail("Should have thrown IOException");
         } catch (final IOException e) {
             
         }
 
-        try (final InputStream is = new ByteArrayInputStream(new String(". 2\n").getBytes("UTF-8"))) {
+        try (final InputStream is = new ByteArrayInputStream(new String(". 2\n").getBytes(StandardCharsets.UTF_8))) {
             DDF.deserialize(is);
             fail("Should have thrown IOException");
         } catch (final IOException e) {
             
         }
 
-        try (final InputStream is = new ByteArrayInputStream(new String(". 2 \n").getBytes("UTF-8"))) {
+        try (final InputStream is = new ByteArrayInputStream(new String(". 2 \n").getBytes(StandardCharsets.UTF_8))) {
             DDF.deserialize(is);
             fail("Should have thrown IOException");
         } catch (final IOException e) {
             
         }
 
-        try (final InputStream is = new ByteArrayInputStream(new String(". 3\n").getBytes("UTF-8"))) {
+        try (final InputStream is = new ByteArrayInputStream(new String(". 3\n").getBytes(StandardCharsets.UTF_8))) {
             DDF.deserialize(is);
             fail("Should have thrown IOException");
         } catch (final IOException e) {
             
         }
 
-        try (final InputStream is = new ByteArrayInputStream(new String(". 3 \n").getBytes("UTF-8"))) {
+        try (final InputStream is = new ByteArrayInputStream(new String(". 3 \n").getBytes(StandardCharsets.UTF_8))) {
             DDF.deserialize(is);
             fail("Should have thrown IOException");
         } catch (final IOException e) {
             
         }
 
-        try (final InputStream is = new ByteArrayInputStream(new String(". 4 \n").getBytes("UTF-8"))) {
+        try (final InputStream is = new ByteArrayInputStream(new String(". 4 \n").getBytes(StandardCharsets.UTF_8))) {
             DDF.deserialize(is);
             fail("Should have thrown IOException");
         } catch (final IOException e) {
             
         }
 
-        try (final InputStream is = new ByteArrayInputStream(new String(". 4\n").getBytes("UTF-8"))) {
+        try (final InputStream is = new ByteArrayInputStream(new String(". 4\n").getBytes(StandardCharsets.UTF_8))) {
             DDF.deserialize(is);
             fail("Should have thrown IOException");
         } catch (final IOException e) {
             
         }
 
-        try (final InputStream is = new ByteArrayInputStream(new String(". 4 2\n. 1 foo\n").getBytes("UTF-8"))) {
+        try (final InputStream is = new ByteArrayInputStream(new String(". 4 2\n. 1 foo\n").getBytes(StandardCharsets.UTF_8))) {
             DDF.deserialize(is);
             fail("Should have thrown IOException");
         } catch (final IOException e) {
             
         }
         
-        try (final InputStream is = new ByteArrayInputStream(new String(". 5 foo\n").getBytes("UTF-8"))) {
+        try (final InputStream is = new ByteArrayInputStream(new String(". 5 foo\n").getBytes(StandardCharsets.UTF_8))) {
             DDF.deserialize(is);
             fail("Should have thrown IOException");
         } catch (final IOException e) {
             
         }
 
-        try (final InputStream is = new ByteArrayInputStream(new String(". 5 1\n").getBytes("UTF-8"))) {
+        try (final InputStream is = new ByteArrayInputStream(new String(". 5 1\n").getBytes(StandardCharsets.UTF_8))) {
             DDF.deserialize(is);
             fail("Should have thrown IOException");
         } catch (final IOException e) {
diff --git a/sp-server-impl/src/main/java/net/shibboleth/sp/impl/DefaultAgentResolver.java b/sp-server-impl/src/main/java/net/shibboleth/sp/impl/DefaultAgentResolver.java
index 0f72a43..fc717d6 100644
--- a/sp-server-impl/src/main/java/net/shibboleth/sp/impl/DefaultAgentResolver.java
+++ b/sp-server-impl/src/main/java/net/shibboleth/sp/impl/DefaultAgentResolver.java
@@ -57,6 +57,7 @@ public class DefaultAgentResolver extends IdentifiedComponentManager<Agent> impl
     }
         
     /** {@inheritDoc} */
+    @Override
     public void doInitialize() throws ComponentInitializationException {
         super.doInitialize();
         
diff --git a/sp-server-impl/src/main/java/net/shibboleth/sp/profile/impl/DecodeAgentRequest.java b/sp-server-impl/src/main/java/net/shibboleth/sp/profile/impl/DecodeAgentRequest.java
index 85bdf76..bd7b67c 100644
--- a/sp-server-impl/src/main/java/net/shibboleth/sp/profile/impl/DecodeAgentRequest.java
+++ b/sp-server-impl/src/main/java/net/shibboleth/sp/profile/impl/DecodeAgentRequest.java
@@ -14,21 +14,19 @@
 
 package net.shibboleth.sp.profile.impl;
 
+import jakarta.servlet.http.HttpServletRequest;
+
 import java.io.IOException;
 import java.io.InputStream;
 
 import javax.annotation.Nonnull;
 
-import org.opensaml.messaging.context.navigate.ChildContextLookup;
 import org.opensaml.profile.action.ActionSupport;
 import org.opensaml.profile.action.EventIds;
 import org.opensaml.profile.context.ProfileRequestContext;
 import org.slf4j.Logger;
 import org.slf4j.MDC;
 
-import jakarta.servlet.http.HttpServletRequest;
-import net.shibboleth.idp.authn.context.AuthenticationContext;
-import net.shibboleth.idp.authn.context.UsernamePasswordContext;
 import net.shibboleth.shared.annotation.constraint.NotEmpty;
 import net.shibboleth.shared.primitive.LoggerFactory;
 import net.shibboleth.sp.context.AgentRequestContext;
diff --git a/sp-server-impl/src/test/java/net/shibboleth/sp/state/impl/CookieStateManagerTest.java b/sp-server-impl/src/test/java/net/shibboleth/sp/state/impl/CookieStateManagerTest.java
index 9352e26..f90bf72 100644
--- a/sp-server-impl/src/test/java/net/shibboleth/sp/state/impl/CookieStateManagerTest.java
+++ b/sp-server-impl/src/test/java/net/shibboleth/sp/state/impl/CookieStateManagerTest.java
@@ -143,6 +143,7 @@ public class CookieStateManagerTest extends BaseApplicationActionTest {
     }
     
     @BeforeMethod
+    @Override
     public void beforeMethod() throws ComponentInitializationException {
         super.beforeMethod();
         
diff --git a/sp-server-impl/src/test/java/net/shibboleth/sp/state/impl/StorageServiceStateManagerTest.java b/sp-server-impl/src/test/java/net/shibboleth/sp/state/impl/StorageServiceStateManagerTest.java
index f83c6d0..f0dbdd4 100644
--- a/sp-server-impl/src/test/java/net/shibboleth/sp/state/impl/StorageServiceStateManagerTest.java
+++ b/sp-server-impl/src/test/java/net/shibboleth/sp/state/impl/StorageServiceStateManagerTest.java
@@ -128,6 +128,7 @@ public class StorageServiceStateManagerTest extends BaseApplicationActionTest {
     }
     
     @BeforeMethod
+    @Override
     public void beforeMethod() throws ComponentInitializationException {
         super.beforeMethod();
         

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


More information about the commits mailing list