From b0242585d74f4307cd75e32a5d8f59f45346de45 Mon Sep 17 00:00:00 2001 From: Norman Maurer Date: Tue, 22 Mar 2016 16:27:19 +0100 Subject: [PATCH] Cleanup code and so eliminate warnings. Motivation: There were some warning in the resolver-dns code base. Modifications: - Fix javadocs - Use the base class to call static method. Result: Cleaner code. --- .../src/main/java/io/netty/resolver/dns/DnsCache.java | 2 -- .../java/io/netty/resolver/dns/DnsNameResolverBuilder.java | 4 ++-- .../main/java/io/netty/resolver/dns/DnsServerAddresses.java | 3 +-- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/resolver-dns/src/main/java/io/netty/resolver/dns/DnsCache.java b/resolver-dns/src/main/java/io/netty/resolver/dns/DnsCache.java index 276cb5af89..79ea3876d5 100644 --- a/resolver-dns/src/main/java/io/netty/resolver/dns/DnsCache.java +++ b/resolver-dns/src/main/java/io/netty/resolver/dns/DnsCache.java @@ -28,8 +28,6 @@ public interface DnsCache { /** * Clears all the resolved addresses cached by this resolver. * - * @return {@code this} - * * @see #clear(String) */ void clear(); diff --git a/resolver-dns/src/main/java/io/netty/resolver/dns/DnsNameResolverBuilder.java b/resolver-dns/src/main/java/io/netty/resolver/dns/DnsNameResolverBuilder.java index 2892d2e2ed..a5861f9dfa 100644 --- a/resolver-dns/src/main/java/io/netty/resolver/dns/DnsNameResolverBuilder.java +++ b/resolver-dns/src/main/java/io/netty/resolver/dns/DnsNameResolverBuilder.java @@ -38,7 +38,7 @@ public final class DnsNameResolverBuilder { private final EventLoop eventLoop; private ChannelFactory channelFactory; private InetSocketAddress localAddress = DnsNameResolver.ANY_LOCAL_ADDR; - private DnsServerAddresses nameServerAddresses = DefaultDnsServerAddresses.defaultAddresses(); + private DnsServerAddresses nameServerAddresses = DnsServerAddresses.defaultAddresses(); private DnsCache resolveCache; private Integer minTtl; private Integer maxTtl; @@ -77,7 +77,7 @@ public final class DnsNameResolverBuilder { * Sets the {@link ChannelFactory} as a {@link ReflectiveChannelFactory} of this type. * Use as an alternative to {@link #channelFactory(ChannelFactory)}. * - * @param channelType + * @param channelType the type * @return {@code this} */ public DnsNameResolverBuilder channelType(Class channelType) { diff --git a/resolver-dns/src/main/java/io/netty/resolver/dns/DnsServerAddresses.java b/resolver-dns/src/main/java/io/netty/resolver/dns/DnsServerAddresses.java index 6d9c4b55d7..fcd842c90a 100644 --- a/resolver-dns/src/main/java/io/netty/resolver/dns/DnsServerAddresses.java +++ b/resolver-dns/src/main/java/io/netty/resolver/dns/DnsServerAddresses.java @@ -23,7 +23,6 @@ import io.netty.util.internal.logging.InternalLoggerFactory; import java.lang.reflect.Method; import java.net.InetAddress; import java.net.InetSocketAddress; -import java.net.SocketAddress; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; @@ -262,7 +261,7 @@ public abstract class DnsServerAddresses { /** * Starts a new infinite stream of DNS server addresses. This method is invoked by {@link DnsNameResolver} on every - * uncached {@link DnsNameResolver#resolve(SocketAddress)} or {@link DnsNameResolver#resolveAll(SocketAddress)}. + * uncached {@link DnsNameResolver#resolve(String)}or {@link DnsNameResolver#resolveAll(String)}. */ public abstract DnsServerAddressStream stream(); }