[java-shib-shared] 02/02: Consolidate exception signature on testing class.
Codeberg
noreply at shibboleth.net
Mon Aug 3 12:33:38 UTC 2026
This is an automated email from the git hooks/post-receive script.
codeberg pushed a commit to branch main
in repository java-shib-shared.
View the commit online:
https://codeberg.org/Shibboleth/java-shib-shared/commit/e823b8c20a0664ff0779ec951fad3e83d644f2b5
commit e823b8c20a0664ff0779ec951fad3e83d644f2b5
Author: Scott Cantor <scott at restingparrotsoftware.com>
AuthorDate: Mon Aug 3 08:33:27 2026 -0400
Consolidate exception signature on testing class.
---
.../net/shibboleth/shared/testing/EmbeddedJetty.java | 17 ++++++++---------
1 file changed, 8 insertions(+), 9 deletions(-)
diff --git a/shib-testing/src/main/java/net/shibboleth/shared/testing/EmbeddedJetty.java b/shib-testing/src/main/java/net/shibboleth/shared/testing/EmbeddedJetty.java
index db6ecef2..5062fc8d 100644
--- a/shib-testing/src/main/java/net/shibboleth/shared/testing/EmbeddedJetty.java
+++ b/shib-testing/src/main/java/net/shibboleth/shared/testing/EmbeddedJetty.java
@@ -19,8 +19,6 @@ import java.io.IOException;
import java.net.InetAddress;
import java.net.InterfaceAddress;
import java.net.NetworkInterface;
-import java.net.SocketException;
-import java.net.UnknownHostException;
import java.nio.ByteBuffer;
import java.util.ArrayList;
import java.util.Collection;
@@ -94,12 +92,11 @@ public class EmbeddedJetty implements Closeable {
*
* <p>The caller is expected to call {@link #stopServer} when finished.</p>
*
- * @param handler
+ * @param handler handler to install
*
- * @throws UnknownHostException
- * @throws SocketException
+ * @throws IOException if startup fails
*/
- public void startServer(final Handler handler) throws UnknownHostException, SocketException {
+ public void startServer(final Handler handler) throws IOException {
final Server server = new Server();
final var sslContextFactory = new SslContextFactory.Server();
@@ -194,10 +191,13 @@ public class EmbeddedJetty implements Closeable {
*/
public static class ResourceHandler extends Handler.Abstract {
+ /** Supplier for status. */
@Nonnull final NonnullSupplier<Integer> statusSupplier;
+ /** Supplier for resource. */
@Nonnull final NonnullSupplier<Resource> resourceSupplier;
+ /** Content type to use. */
@Nullable String contentType;
/**
@@ -268,10 +268,9 @@ public class EmbeddedJetty implements Closeable {
/**
* Resolve all applicable localhost interfaces.
*
- * @throws UnknownHostException
- * @throws SocketException
+ * @throws IOException if unable to resolve localhost address or interfaces
*/
- private void resolveListenAddresses() throws UnknownHostException, SocketException {
+ private void resolveListenAddresses() throws IOException {
// As of HttpClient 5.x, we need Jetty to listen on all localhost IPv4 and IPv6 addresses,
// b/c on connection failure (e.g. TLS handshake failure) HC will try them all,
// so they all have to respond similarly for the tests that expect failure via a specified exception type.
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list