From 69dab1365ee14d7a2e3a55cd8e2f349b45982445 Mon Sep 17 00:00:00 2001 From: Ryan Harg Date: Wed, 27 Nov 2024 13:29:14 +0100 Subject: [PATCH] Fix property injection --- src/main/java/de/rpr/ddnsclient/Updater.java | 3 ++- src/main/java/de/rpr/ddnsclient/lookup/DnsResolver.java | 1 - 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/de/rpr/ddnsclient/Updater.java b/src/main/java/de/rpr/ddnsclient/Updater.java index 7ec107c..3967875 100644 --- a/src/main/java/de/rpr/ddnsclient/Updater.java +++ b/src/main/java/de/rpr/ddnsclient/Updater.java @@ -16,6 +16,7 @@ import java.time.Duration; import java.time.LocalDateTime; import java.util.HashMap; import java.util.Map; +import java.util.Optional; @ApplicationScoped public class Updater { @@ -36,7 +37,7 @@ public class Updater { PublicIpLookup publicIpLookup, DnsResolver dnsResolver, Config config, - @ConfigProperty(name = "ddnsclient.backoff-duration:300s") Duration backoff) { + @ConfigProperty(name = "ddnsclient.backoff-duration", defaultValue = "300s") Duration backoff) { this.dynDnsRouter = dynDnsRouter; this.publicIpLookup = publicIpLookup; this.dnsResolver = dnsResolver; diff --git a/src/main/java/de/rpr/ddnsclient/lookup/DnsResolver.java b/src/main/java/de/rpr/ddnsclient/lookup/DnsResolver.java index 29da784..9a54e77 100644 --- a/src/main/java/de/rpr/ddnsclient/lookup/DnsResolver.java +++ b/src/main/java/de/rpr/ddnsclient/lookup/DnsResolver.java @@ -27,7 +27,6 @@ public class DnsResolver { int resolveCounter = 0; try { - Attributes result; do { if (resolveCounter == MAX_RETRIES) {