From 5c2d18deb48e87156daf1ea831f6da242aeba514 Mon Sep 17 00:00:00 2001 From: Florian Schmaus Date: Mon, 2 Jan 2017 10:46:07 +0100 Subject: [PATCH] Bump MiniDNS to 0.2 --- smack-resolver-minidns/build.gradle | 2 +- .../smack/util/dns/minidns/MiniDnsResolver.java | 13 ++++--------- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/smack-resolver-minidns/build.gradle b/smack-resolver-minidns/build.gradle index 8e5c95b9e..a084e3171 100644 --- a/smack-resolver-minidns/build.gradle +++ b/smack-resolver-minidns/build.gradle @@ -5,6 +5,6 @@ javax.naming API (e.g. Android).""" dependencies { compile project(path: ':smack-core') - compile 'de.measite.minidns:minidns-hla:0.2.0-beta1' + compile 'de.measite.minidns:minidns-hla:[0.2,0.3)' compile "org.jxmpp:jxmpp-util-cache:$jxmppVersion" } diff --git a/smack-resolver-minidns/src/main/java/org/jivesoftware/smack/util/dns/minidns/MiniDnsResolver.java b/smack-resolver-minidns/src/main/java/org/jivesoftware/smack/util/dns/minidns/MiniDnsResolver.java index eda7d7929..b62bdcb71 100644 --- a/smack-resolver-minidns/src/main/java/org/jivesoftware/smack/util/dns/minidns/MiniDnsResolver.java +++ b/smack-resolver-minidns/src/main/java/org/jivesoftware/smack/util/dns/minidns/MiniDnsResolver.java @@ -1,6 +1,6 @@ /** * - * Copyright 2014-2016 Florian Schmaus + * Copyright 2014-2017 Florian Schmaus * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -30,18 +30,15 @@ import org.jivesoftware.smack.util.dns.DNSResolver; import org.jivesoftware.smack.util.dns.HostAddress; import org.jivesoftware.smack.util.dns.SRVRecord; -import de.measite.minidns.DNSCache; import de.measite.minidns.DNSMessage.RESPONSE_CODE; import de.measite.minidns.Question; -import de.measite.minidns.cache.LRUCache; -import de.measite.minidns.dnssec.DNSSECClient; +import de.measite.minidns.hla.DnssecResolverApi; import de.measite.minidns.hla.ResolutionUnsuccessfulException; import de.measite.minidns.hla.ResolverApi; import de.measite.minidns.hla.ResolverResult; import de.measite.minidns.record.A; import de.measite.minidns.record.AAAA; import de.measite.minidns.record.SRV; -import de.measite.minidns.recursive.ReliableDNSClient; /** @@ -52,11 +49,9 @@ public class MiniDnsResolver extends DNSResolver implements SmackInitializer { private static final MiniDnsResolver INSTANCE = new MiniDnsResolver(); - private static final DNSCache CACHE = new LRUCache(128); + private static final ResolverApi DNSSEC_RESOLVER = DnssecResolverApi.INSTANCE; - private static final ResolverApi DNSSEC_RESOLVER = new ResolverApi(new DNSSECClient(CACHE)); - - private static final ResolverApi NON_DNSSEC_RESOLVER = new ResolverApi(new ReliableDNSClient(CACHE)); + private static final ResolverApi NON_DNSSEC_RESOLVER = ResolverApi.INSTANCE; public static DNSResolver getInstance() { return INSTANCE;