1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-12-22 02:27:58 +01:00

Bump MiniDNS to 0.2

This commit is contained in:
Florian Schmaus 2017-01-02 10:46:07 +01:00
parent 5027e9001f
commit 5c2d18deb4
2 changed files with 5 additions and 10 deletions

View file

@ -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"
}

View file

@ -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;