mirror of
https://github.com/shred/acme4j.git
synced 2025-12-13 11:14:02 +08:00
Deprecate update() and AcmeRetryAfterException
This commit is contained in:
@@ -123,7 +123,11 @@ public abstract class AcmeJsonResource extends AcmeResource {
|
||||
* {@link AcmeRetryAfterException#getRetryAfter()}. Note that the status of
|
||||
* the resource is updated even if this exception was thrown.
|
||||
* @see #fetch()
|
||||
* @deprecated Use {@link #fetch()} instead. It returns the retry-after value as
|
||||
* {@link Optional} instead of throwing an {@link AcmeRetryAfterException}. This
|
||||
* method will be removed in a future version.
|
||||
*/
|
||||
@Deprecated
|
||||
public void update() throws AcmeException {
|
||||
var retryAfter = fetch();
|
||||
if (retryAfter.isPresent()) {
|
||||
|
||||
@@ -25,7 +25,10 @@ import org.shredzone.acme4j.AcmeJsonResource;
|
||||
* Note: Prefer to use {@link AcmeJsonResource#fetch()}. Invoking
|
||||
* {@link AcmeJsonResource#update()} and catching this exception is unnecessary
|
||||
* complicated and a legacy from acme4j v2 which will disappear in a future release.
|
||||
*
|
||||
* @deprecated Will be removed in a future version.
|
||||
*/
|
||||
@Deprecated
|
||||
public class AcmeRetryAfterException extends AcmeException {
|
||||
private static final long serialVersionUID = 4461979121063649905L;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user