From 4db40eadbe6ed0f9927953607714b71544dd2a6d Mon Sep 17 00:00:00 2001 From: Sophy Cao Date: Tue, 21 Sep 2021 17:01:49 +0200 Subject: [PATCH] Bug fix: Add default implementation of resolveAsync to make the interface backwards compatible --- pom.xml | 10 +++++++++- src/main/java/com/spotify/dns/DnsSrvResolver.java | 4 +++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 8e4cf2b..8c730b7 100644 --- a/pom.xml +++ b/pom.xml @@ -313,7 +313,7 @@ com.spotify ${project.artifactId} - 3.0.2 + 3.3.0 @@ -322,6 +322,14 @@ + + + METHOD_ABSTRACT_NOW_DEFAULT + true + true + PATCH + + true true diff --git a/src/main/java/com/spotify/dns/DnsSrvResolver.java b/src/main/java/com/spotify/dns/DnsSrvResolver.java index b20623c..bfb0bc3 100644 --- a/src/main/java/com/spotify/dns/DnsSrvResolver.java +++ b/src/main/java/com/spotify/dns/DnsSrvResolver.java @@ -45,5 +45,7 @@ public interface DnsSrvResolver { * @return a possibly empty list of matching records * @throws DnsException if there was an error doing the DNS lookup */ - CompletionStage> resolveAsync(String fqdn); + default CompletionStage> resolveAsync(String fqdn) { + throw new java.lang.UnsupportedOperationException("Not implemented"); + } }