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
This commit is contained in:
@@ -69,7 +69,7 @@ public final class EmbeddedLdapServer implements AutoCloseable {
|
||||
*/
|
||||
@Deprecated(since = "3.3")
|
||||
public static EmbeddedLdapServer newEmbeddedServer(String defaultPartitionName, String defaultPartitionSuffix,
|
||||
int port) {
|
||||
int port) throws Exception {
|
||||
EmbeddedLdapServer server = EmbeddedLdapServer.withPartitionSuffix(defaultPartitionSuffix)
|
||||
.partitionName(defaultPartitionName)
|
||||
.port(port)
|
||||
|
||||
@@ -49,7 +49,7 @@ public class EmbeddedLdapServerTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void shouldStartAndCloseServer() {
|
||||
public void shouldStartAndCloseServer() throws Exception {
|
||||
assertPortIsFree(this.port);
|
||||
|
||||
EmbeddedLdapServer server = EmbeddedLdapServer.newEmbeddedServer("jayway", "dc=jayway,dc=se", this.port);
|
||||
@@ -60,7 +60,7 @@ public class EmbeddedLdapServerTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void shouldStartAndAutoCloseServer() {
|
||||
public void shouldStartAndAutoCloseServer() throws Exception {
|
||||
assertPortIsFree(this.port);
|
||||
|
||||
try (EmbeddedLdapServer ignored = EmbeddedLdapServer.newEmbeddedServer("jayway", "dc=jayway,dc=se",
|
||||
@@ -82,7 +82,7 @@ public class EmbeddedLdapServerTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void startWhenNewEmbeddedServerThenException() {
|
||||
public void startWhenNewEmbeddedServerThenException() throws Exception {
|
||||
EmbeddedLdapServer server = EmbeddedLdapServer.newEmbeddedServer("jayway", "dc=jayway,dc=se", this.port);
|
||||
assertThatExceptionOfType(IllegalArgumentException.class).isThrownBy(server::start);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user