Skip to content

Commit 58c10af

Browse files
committed
Remove throws declaration
1 parent 77e13ef commit 58c10af

File tree

2 files changed

+13
-5
lines changed

2 files changed

+13
-5
lines changed

src/test/java/org/java_websocket/misc/OpeningHandshakeRejectionTest.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,12 @@ public class OpeningHandshakeRejectionTest {
5151
private static final String additionalHandshake = "Upgrade: websocket\r\nConnection: Upgrade\r\n\r\n";
5252

5353
@BeforeEach
54-
public void startServer() throws IOException, InterruptedException {
55-
port = SocketUtil.getAvailablePort();
54+
public void startServer() {
55+
try {
56+
port = SocketUtil.getAvailablePort();
57+
} catch (InterruptedException e) {
58+
throw new RuntimeException(e);
59+
}
5660
thread = new Thread(
5761
() -> {
5862
try {

src/test/java/org/java_websocket/protocols/ProtocolHandshakeRejectionTest.java

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,13 @@ public class ProtocolHandshakeRejectionTest {
5858
private int port = -1;
5959

6060
@BeforeEach
61-
public void startServer() throws InterruptedException {
62-
port = SocketUtil.getAvailablePort();
63-
thread = new Thread(
61+
public void startServer() {
62+
try {
63+
port = SocketUtil.getAvailablePort();
64+
} catch (InterruptedException e) {
65+
throw new RuntimeException(e);
66+
}
67+
thread = new Thread(
6468
new Runnable() {
6569
public void run() {
6670
try {

0 commit comments

Comments
 (0)