diff --git a/acme4j-client/src/main/java/org/shredzone/acme4j/OrderBuilder.java b/acme4j-client/src/main/java/org/shredzone/acme4j/OrderBuilder.java index 8aab9edd..97e377fb 100644 --- a/acme4j-client/src/main/java/org/shredzone/acme4j/OrderBuilder.java +++ b/acme4j-client/src/main/java/org/shredzone/acme4j/OrderBuilder.java @@ -178,65 +178,6 @@ public class OrderBuilder { return this; } - /** - * Notifies the CA that the ordered certificate will replace a previously issued - * certificate. The certificate is identified by its ARI unique identifier. - *
- * Optional, only supported if the CA provides renewal information. However, in this - * case the client should include this field. - * - * @param uniqueId - * Certificate's renewal unique identifier. - * @return itself - * @draft This method is currently based on an RFC draft. It may be changed or removed - * without notice to reflect future changes to the draft. SemVer rules do not apply - * here. - * @since 3.2.0 - */ - public OrderBuilder replaces(String uniqueId) { - autoRenewal(); - this.replaces = Objects.requireNonNull(uniqueId); - return this; - } - - /** - * Notifies the CA that the ordered certificate will replace a previously issued - * certificate. - *
- * Optional, only supported if the CA provides renewal information. However, in this - * case the client should include this field. - * - * @param certificate - * Certificate to be replaced - * @return itself - * @draft This method is currently based on an RFC draft. It may be changed or removed - * without notice to reflect future changes to the draft. SemVer rules do not apply - * here. - * @since 3.2.0 - */ - public OrderBuilder replaces(X509Certificate certificate) { - return replaces(getRenewalUniqueIdentifier(certificate)); - } - - /** - * Notifies the CA that the ordered certificate will replace a previously issued - * certificate. - *
- * Optional, only supported if the CA provides renewal information. However, in this - * case the client should include this field. - * - * @param certificate - * Certificate to be replaced - * @return itself - * @draft This method is currently based on an RFC draft. It may be changed or removed - * without notice to reflect future changes to the draft. SemVer rules do not apply - * here. - * @since 3.2.0 - */ - public OrderBuilder replaces(Certificate certificate) { - return replaces(certificate.getCertificate()); - } - /** * Sets the earliest date of validity of the first issued certificate. If not set, * the start date is the earliest possible date. @@ -328,6 +269,64 @@ public class OrderBuilder { return this; } + /** + * Notifies the CA that the ordered certificate will replace a previously issued + * certificate. The certificate is identified by its ARI unique identifier. + *
+ * Optional, only supported if the CA provides renewal information. However, in this + * case the client should include this field. + * + * @param uniqueId + * Certificate's renewal unique identifier. + * @return itself + * @draft This method is currently based on an RFC draft. It may be changed or removed + * without notice to reflect future changes to the draft. SemVer rules do not apply + * here. + * @since 3.2.0 + */ + public OrderBuilder replaces(String uniqueId) { + this.replaces = Objects.requireNonNull(uniqueId); + return this; + } + + /** + * Notifies the CA that the ordered certificate will replace a previously issued + * certificate. + *
+ * Optional, only supported if the CA provides renewal information. However, in this + * case the client should include this field. + * + * @param certificate + * Certificate to be replaced + * @return itself + * @draft This method is currently based on an RFC draft. It may be changed or removed + * without notice to reflect future changes to the draft. SemVer rules do not apply + * here. + * @since 3.2.0 + */ + public OrderBuilder replaces(X509Certificate certificate) { + return replaces(getRenewalUniqueIdentifier(certificate)); + } + + /** + * Notifies the CA that the ordered certificate will replace a previously issued + * certificate. + *
+ * Optional, only supported if the CA provides renewal information. However, in this + * case the client should include this field. + * + * @param certificate + * Certificate to be replaced + * @return itself + * @draft This method is currently based on an RFC draft. It may be changed or removed + * without notice to reflect future changes to the draft. SemVer rules do not apply + * here. + * @since 3.2.0 + */ + public OrderBuilder replaces(Certificate certificate) { + return replaces(certificate.getCertificate()); + } + /** * Sends a new order to the server, and returns an {@link Order} object. *