Skip to content

Commit 33bd8bc

Browse files
committed
Restore Missing Exception
In order to remain binary compatible, we cannot remove checked exceptions from signatures. And since this method is deprecated anyway, there is little to be gained from changing its signature. Issue gh-938
1 parent 553b5ed commit 33bd8bc

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

test-support/src/main/java/org/springframework/ldap/test/unboundid/EmbeddedLdapServer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ public static Builder withPartitionSuffix(String partitionSuffix) {
6969
*/
7070
@Deprecated(since = "3.3")
7171
public static EmbeddedLdapServer newEmbeddedServer(String defaultPartitionName, String defaultPartitionSuffix,
72-
int port) {
72+
int port) throws Exception {
7373
EmbeddedLdapServer server = EmbeddedLdapServer.withPartitionSuffix(defaultPartitionSuffix)
7474
.partitionName(defaultPartitionName)
7575
.port(port)

test-support/src/test/java/org/springframework/ldap/test/unboundid/EmbeddedLdapServerTests.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public void setUp() throws IOException {
4949
}
5050

5151
@Test
52-
public void shouldStartAndCloseServer() {
52+
public void shouldStartAndCloseServer() throws Exception {
5353
assertPortIsFree(this.port);
5454

5555
EmbeddedLdapServer server = EmbeddedLdapServer.newEmbeddedServer("jayway", "dc=jayway,dc=se", this.port);
@@ -60,7 +60,7 @@ public void shouldStartAndCloseServer() {
6060
}
6161

6262
@Test
63-
public void shouldStartAndAutoCloseServer() {
63+
public void shouldStartAndAutoCloseServer() throws Exception {
6464
assertPortIsFree(this.port);
6565

6666
try (EmbeddedLdapServer ignored = EmbeddedLdapServer.newEmbeddedServer("jayway", "dc=jayway,dc=se",
@@ -82,7 +82,7 @@ public void shouldStartAndCloseServerViaLdapTestUtils() throws Exception {
8282
}
8383

8484
@Test
85-
public void startWhenNewEmbeddedServerThenException() {
85+
public void startWhenNewEmbeddedServerThenException() throws Exception {
8686
EmbeddedLdapServer server = EmbeddedLdapServer.newEmbeddedServer("jayway", "dc=jayway,dc=se", this.port);
8787
assertThatExceptionOfType(IllegalArgumentException.class).isThrownBy(server::start);
8888
}

0 commit comments

Comments
 (0)