diff options
author | Matthias Andreas Benkard <code@mail.matthias.benkard.de> | 2021-06-28 19:58:36 +0200 |
---|---|---|
committer | Matthias Andreas Benkard <code@mail.matthias.benkard.de> | 2021-06-28 20:28:40 +0200 |
commit | a50ac8daab5f90dbf329446cc20c9e9458f24402 (patch) | |
tree | 81241eba77a1119201ded1ae07e3f2451643e153 /src/main/java | |
parent | d4df22db3db5a30c285a5c40f69d70ceae17ff80 (diff) |
Update dependencies.
Change-Id: Ibca1be39b37f76ad9dfe743087959559d3f65d2a
Diffstat (limited to 'src/main/java')
3 files changed, 3 insertions, 3 deletions
diff --git a/src/main/java/eu/mulk/mulkcms2/benki/newsletter/NewsletterResource.java b/src/main/java/eu/mulk/mulkcms2/benki/newsletter/NewsletterResource.java index 3786c9c..948ef4b 100644 --- a/src/main/java/eu/mulk/mulkcms2/benki/newsletter/NewsletterResource.java +++ b/src/main/java/eu/mulk/mulkcms2/benki/newsletter/NewsletterResource.java @@ -55,7 +55,7 @@ public class NewsletterResource { var mailText = Templates.registrationMail(subscription.registrationKey); var sendJob = mailText.subject("MulkCMS newsletter registration").to(email).send(); var page = Templates.completeRegistration().render(); - return sendJob.thenApply((x) -> page); + return sendJob.onItem().transform(x -> page).subscribeAsCompletionStage(); } @GET diff --git a/src/main/java/eu/mulk/mulkcms2/benki/newsletter/NewsletterSender.java b/src/main/java/eu/mulk/mulkcms2/benki/newsletter/NewsletterSender.java index 8c8c9b6..1dacccc 100644 --- a/src/main/java/eu/mulk/mulkcms2/benki/newsletter/NewsletterSender.java +++ b/src/main/java/eu/mulk/mulkcms2/benki/newsletter/NewsletterSender.java @@ -106,7 +106,7 @@ public class NewsletterSender { .to(senderAddress) .bcc(subscriberEmails) .send(); - sendJob.toCompletableFuture().get(10000, TimeUnit.SECONDS); + sendJob.subscribe().asCompletionStage().get(10000, TimeUnit.SECONDS); } @TemplateExtension diff --git a/src/main/java/eu/mulk/mulkcms2/benki/newsletter/NewsletterUnsubscriber.java b/src/main/java/eu/mulk/mulkcms2/benki/newsletter/NewsletterUnsubscriber.java index 0a67ff6..d157a87 100644 --- a/src/main/java/eu/mulk/mulkcms2/benki/newsletter/NewsletterUnsubscriber.java +++ b/src/main/java/eu/mulk/mulkcms2/benki/newsletter/NewsletterUnsubscriber.java @@ -47,7 +47,7 @@ public class NewsletterUnsubscriber implements Processor { .subject("Unsubscribed from MulkCMS newsletter") .to(address) .send(); - sendJob.toCompletableFuture().get(60, TimeUnit.SECONDS); + sendJob.subscribeAsCompletionStage().get(60, TimeUnit.SECONDS); s.delete(); |