1
0
Fork 0
mirror of https://codeberg.org/Mercury-IM/Smack synced 2024-11-26 00:02:06 +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 { dependencies {
compile project(path: ':smack-core') 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" 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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with 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.HostAddress;
import org.jivesoftware.smack.util.dns.SRVRecord; import org.jivesoftware.smack.util.dns.SRVRecord;
import de.measite.minidns.DNSCache;
import de.measite.minidns.DNSMessage.RESPONSE_CODE; import de.measite.minidns.DNSMessage.RESPONSE_CODE;
import de.measite.minidns.Question; import de.measite.minidns.Question;
import de.measite.minidns.cache.LRUCache; import de.measite.minidns.hla.DnssecResolverApi;
import de.measite.minidns.dnssec.DNSSECClient;
import de.measite.minidns.hla.ResolutionUnsuccessfulException; import de.measite.minidns.hla.ResolutionUnsuccessfulException;
import de.measite.minidns.hla.ResolverApi; import de.measite.minidns.hla.ResolverApi;
import de.measite.minidns.hla.ResolverResult; import de.measite.minidns.hla.ResolverResult;
import de.measite.minidns.record.A; import de.measite.minidns.record.A;
import de.measite.minidns.record.AAAA; import de.measite.minidns.record.AAAA;
import de.measite.minidns.record.SRV; 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 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 = ResolverApi.INSTANCE;
private static final ResolverApi NON_DNSSEC_RESOLVER = new ResolverApi(new ReliableDNSClient(CACHE));
public static DNSResolver getInstance() { public static DNSResolver getInstance() {
return INSTANCE; return INSTANCE;