Skip to content

Commit 6049781

Browse files
committed
sonarqube doesn't like multiple throws in the assertThrows area
1 parent 3cfb420 commit 6049781

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

src/test/java/ch/loway/oss/ari4java/tools/http/NettyHttpClientTest.java

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -53,19 +53,17 @@ public void tearDown() {
5353
}
5454

5555
@Test
56-
public void testInitializeBadURL() {
57-
assertThrows(URISyntaxException.class, () -> {
58-
setupTestClient(false);
59-
client.initialize(":", "", "");
60-
});
56+
public void testInitializeBadURL() throws URISyntaxException {
57+
setupTestClient(false);
58+
assertThrows(URISyntaxException.class, () ->
59+
client.initialize(":", "", ""));
6160
}
6261

6362
@Test
64-
public void testInitializeInvalidURL() {
65-
assertThrows(IllegalArgumentException.class, () -> {
66-
setupTestClient(false);
67-
client.initialize("ws://localhost:8088/", "", "");
68-
});
63+
public void testInitializeInvalidURL() throws URISyntaxException {
64+
setupTestClient(false);
65+
assertThrows(IllegalArgumentException.class, () ->
66+
client.initialize("ws://localhost:8088/", "", ""));
6967
}
7068

7169
@Test

0 commit comments

Comments
 (0)