Remove deprecated methods (as announced)

pull/81/head
Richard Körber 2018-09-26 20:03:48 +02:00
parent 6cea9b5e95
commit a8a9bb4ebf
No known key found for this signature in database
GPG Key ID: AAB9FD19C78AA3E0
7 changed files with 0 additions and 55 deletions

View File

@ -46,20 +46,6 @@ public class Authorization extends AcmeJsonResource {
super(login, location);
}
/**
* Gets the domain name to be authorized.
* <p>
* For wildcard domain orders, the domain itself (without wildcard prefix) is returned
* here. To find out if this {@link Authorization} is related to a wildcard domain
* order, check the {@link #isWildcard()} method.
*
* @deprecated Use {@link #getIdentifier()}.
*/
@Deprecated
public String getDomain() {
return getIdentifier().getDomain();
}
/**
* Gets the {@link Identifier} to be authorized.
* <p>

View File

@ -70,20 +70,6 @@ public class Order extends AcmeJsonResource {
return getJSON().get("expires").map(Value::asInstant).orElse(null);
}
/**
* Gets the list of domain names to be ordered.
*
* @deprecated Use {@link #getIdentifiers()}. This method only returns DNS type
* identifiers for compatibility reasons.
*/
@Deprecated
public List<String> getDomains() {
return getIdentifiers().stream()
.filter(i -> Identifier.TYPE_DNS.equals(i.getType()))
.map(Identifier::getDomain)
.collect(toList());
}
/**
* Gets the list of {@link Identifier} to be ordered.
*

View File

@ -112,18 +112,6 @@ public class Problem implements Serializable {
.orElse(null);
}
/**
* Returns the domain this problem relates to. May be {@code null}.
*
* @deprecated Use {@link #getIdentifier()}.
*/
@Deprecated
@CheckForNull
public String getDomain() {
Identifier identifier = getIdentifier();
return identifier != null ? identifier.getDomain() : null;
}
/**
* Returns the {@link Identifier} this problem relates to. May be {@code null}.
*

View File

@ -169,7 +169,6 @@ public class AccountTest {
* Test that a domain can be pre-authorized.
*/
@Test
@SuppressWarnings("deprecation")
public void testPreAuthorizeDomain() throws Exception {
TestableConnectionProvider provider = new TestableConnectionProvider() {
@Override
@ -202,7 +201,6 @@ public class AccountTest {
Account account = new Account(login);
Authorization auth = account.preAuthorizeDomain(domainName);
assertThat(auth.getDomain(), is(domainName));
assertThat(auth.getIdentifier().getDomain(), is(domainName));
assertThat(auth.getStatus(), is(Status.PENDING));
assertThat(auth.getExpires(), is(nullValue()));

View File

@ -88,7 +88,6 @@ public class AuthorizationTest {
* Test that authorization is properly updated.
*/
@Test
@SuppressWarnings("deprecation")
public void testUpdate() throws Exception {
TestableConnectionProvider provider = new TestableConnectionProvider() {
@Override
@ -117,7 +116,6 @@ public class AuthorizationTest {
Authorization auth = new Authorization(login, locationUrl);
auth.update();
assertThat(auth.getDomain(), is("example.org"));
assertThat(auth.getIdentifier().getDomain(), is("example.org"));
assertThat(auth.getStatus(), is(Status.VALID));
assertThat(auth.isWildcard(), is(false));

View File

@ -46,7 +46,6 @@ public class OrderBuilderTest {
* Test that a new {@link Order} can be created.
*/
@Test
@SuppressWarnings("deprecation")
public void testOrderCertificate() throws Exception {
Instant notBefore = parseTimestamp("2016-01-01T00:00:00Z");
Instant notAfter = parseTimestamp("2016-01-08T00:00:00Z");
@ -88,12 +87,6 @@ public class OrderBuilderTest {
.notAfter(notAfter)
.create();
assertThat(order.getDomains(), containsInAnyOrder(
"example.com", "www.example.com",
"example.org",
"m.example.com", "m.example.org",
"d.example.com",
"d2.example.com"));
assertThat(order.getIdentifiers(), containsInAnyOrder(
Identifier.dns("example.com"),
Identifier.dns("www.example.com"),

View File

@ -44,7 +44,6 @@ public class OrderTest {
* Test that order is properly updated.
*/
@Test
@SuppressWarnings("deprecation")
public void testUpdate() throws Exception {
TestableConnectionProvider provider = new TestableConnectionProvider() {
@Override
@ -73,7 +72,6 @@ public class OrderTest {
assertThat(order.getExpires(), is(parseTimestamp("2015-03-01T14:09:00Z")));
assertThat(order.getLocation(), is(locationUrl));
assertThat(order.getDomains(), containsInAnyOrder("example.com", "www.example.com"));
assertThat(order.getIdentifiers(), containsInAnyOrder(
Identifier.dns("example.com"),
Identifier.dns("www.example.com")));
@ -150,7 +148,6 @@ public class OrderTest {
* Test that order is properly finalized.
*/
@Test
@SuppressWarnings("deprecation")
public void testFinalize() throws Exception {
byte[] csr = TestUtils.getResourceAsByteArray("/csr.der");
@ -192,7 +189,6 @@ public class OrderTest {
assertThat(order.getExpires(), is(parseTimestamp("2015-03-01T14:09:00Z")));
assertThat(order.getLocation(), is(locationUrl));
assertThat(order.getDomains(), containsInAnyOrder("example.com", "www.example.com"));
assertThat(order.getIdentifiers(), containsInAnyOrder(
Identifier.dns("example.com"),
Identifier.dns("www.example.com")));