Remove redundant throws clauses / Suppress inspections for some false positives
This commit is contained in:
parent
c3c75717db
commit
1b35cfee85
@ -15,6 +15,13 @@
|
|||||||
*/
|
*/
|
||||||
package org.jboss.netty.channel.socket.nio;
|
package org.jboss.netty.channel.socket.nio;
|
||||||
|
|
||||||
|
import org.jboss.netty.buffer.ChannelBuffer;
|
||||||
|
import org.jboss.netty.buffer.CompositeChannelBuffer;
|
||||||
|
import org.jboss.netty.channel.DefaultFileRegion;
|
||||||
|
import org.jboss.netty.channel.FileRegion;
|
||||||
|
import org.jboss.netty.util.ExternalResourceReleasable;
|
||||||
|
import org.jboss.netty.util.internal.ByteBufferUtil;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.lang.ref.SoftReference;
|
import java.lang.ref.SoftReference;
|
||||||
import java.net.SocketAddress;
|
import java.net.SocketAddress;
|
||||||
@ -23,13 +30,6 @@ import java.nio.channels.DatagramChannel;
|
|||||||
import java.nio.channels.GatheringByteChannel;
|
import java.nio.channels.GatheringByteChannel;
|
||||||
import java.nio.channels.WritableByteChannel;
|
import java.nio.channels.WritableByteChannel;
|
||||||
|
|
||||||
import org.jboss.netty.buffer.ChannelBuffer;
|
|
||||||
import org.jboss.netty.buffer.CompositeChannelBuffer;
|
|
||||||
import org.jboss.netty.channel.DefaultFileRegion;
|
|
||||||
import org.jboss.netty.channel.FileRegion;
|
|
||||||
import org.jboss.netty.util.ExternalResourceReleasable;
|
|
||||||
import org.jboss.netty.util.internal.ByteBufferUtil;
|
|
||||||
|
|
||||||
final class SocketSendBufferPool implements ExternalResourceReleasable {
|
final class SocketSendBufferPool implements ExternalResourceReleasable {
|
||||||
|
|
||||||
private static final SendBuffer EMPTY_BUFFER = new EmptySendBuffer();
|
private static final SendBuffer EMPTY_BUFFER = new EmptySendBuffer();
|
||||||
@ -335,8 +335,7 @@ final class SocketSendBufferPool implements ExternalResourceReleasable {
|
|||||||
return localWrittenBytes;
|
return localWrittenBytes;
|
||||||
}
|
}
|
||||||
|
|
||||||
public long transferTo(DatagramChannel ch, SocketAddress raddr)
|
public long transferTo(DatagramChannel ch, SocketAddress raddr) {
|
||||||
throws IOException {
|
|
||||||
throw new UnsupportedOperationException();
|
throw new UnsupportedOperationException();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -365,11 +364,11 @@ final class SocketSendBufferPool implements ExternalResourceReleasable {
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public long transferTo(WritableByteChannel ch) throws IOException {
|
public long transferTo(WritableByteChannel ch) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public long transferTo(DatagramChannel ch, SocketAddress raddr) throws IOException {
|
public long transferTo(DatagramChannel ch, SocketAddress raddr) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -15,7 +15,14 @@
|
|||||||
*/
|
*/
|
||||||
package org.jboss.netty.channel.socket.oio;
|
package org.jboss.netty.channel.socket.oio;
|
||||||
|
|
||||||
import static org.jboss.netty.channel.Channels.*;
|
import org.jboss.netty.channel.ChannelException;
|
||||||
|
import org.jboss.netty.channel.ChannelFactory;
|
||||||
|
import org.jboss.netty.channel.ChannelFuture;
|
||||||
|
import org.jboss.netty.channel.ChannelPipeline;
|
||||||
|
import org.jboss.netty.channel.ChannelSink;
|
||||||
|
import org.jboss.netty.channel.socket.DatagramChannel;
|
||||||
|
import org.jboss.netty.channel.socket.DatagramChannelConfig;
|
||||||
|
import org.jboss.netty.channel.socket.DefaultDatagramChannelConfig;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.net.InetAddress;
|
import java.net.InetAddress;
|
||||||
@ -24,15 +31,7 @@ import java.net.MulticastSocket;
|
|||||||
import java.net.NetworkInterface;
|
import java.net.NetworkInterface;
|
||||||
import java.net.SocketException;
|
import java.net.SocketException;
|
||||||
|
|
||||||
import org.jboss.netty.channel.ChannelException;
|
import static org.jboss.netty.channel.Channels.*;
|
||||||
import org.jboss.netty.channel.ChannelFactory;
|
|
||||||
import org.jboss.netty.channel.ChannelFuture;
|
|
||||||
import org.jboss.netty.channel.ChannelPipeline;
|
|
||||||
import org.jboss.netty.channel.ChannelSink;
|
|
||||||
import org.jboss.netty.channel.Channels;
|
|
||||||
import org.jboss.netty.channel.socket.DatagramChannel;
|
|
||||||
import org.jboss.netty.channel.socket.DatagramChannelConfig;
|
|
||||||
import org.jboss.netty.channel.socket.DefaultDatagramChannelConfig;
|
|
||||||
|
|
||||||
final class OioDatagramChannel extends AbstractOioChannel
|
final class OioDatagramChannel extends AbstractOioChannel
|
||||||
implements DatagramChannel {
|
implements DatagramChannel {
|
||||||
@ -139,7 +138,7 @@ final class OioDatagramChannel extends AbstractOioChannel
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
void closeSocket() throws IOException {
|
void closeSocket() {
|
||||||
socket.close();
|
socket.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -15,16 +15,14 @@
|
|||||||
*/
|
*/
|
||||||
package org.jboss.netty.example.securechat;
|
package org.jboss.netty.example.securechat;
|
||||||
|
|
||||||
import java.security.InvalidAlgorithmParameterException;
|
|
||||||
import java.security.KeyStore;
|
|
||||||
import java.security.KeyStoreException;
|
|
||||||
import java.security.cert.CertificateException;
|
|
||||||
import java.security.cert.X509Certificate;
|
|
||||||
|
|
||||||
import javax.net.ssl.ManagerFactoryParameters;
|
import javax.net.ssl.ManagerFactoryParameters;
|
||||||
import javax.net.ssl.TrustManager;
|
import javax.net.ssl.TrustManager;
|
||||||
import javax.net.ssl.TrustManagerFactorySpi;
|
import javax.net.ssl.TrustManagerFactorySpi;
|
||||||
import javax.net.ssl.X509TrustManager;
|
import javax.net.ssl.X509TrustManager;
|
||||||
|
import java.security.InvalidAlgorithmParameterException;
|
||||||
|
import java.security.KeyStore;
|
||||||
|
import java.security.KeyStoreException;
|
||||||
|
import java.security.cert.X509Certificate;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Bogus {@link TrustManagerFactorySpi} which accepts any certificate
|
* Bogus {@link TrustManagerFactorySpi} which accepts any certificate
|
||||||
@ -37,8 +35,7 @@ public class SecureChatTrustManagerFactory extends TrustManagerFactorySpi {
|
|||||||
return new X509Certificate[0];
|
return new X509Certificate[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
public void checkClientTrusted(
|
public void checkClientTrusted(X509Certificate[] chain, String authType) {
|
||||||
X509Certificate[] chain, String authType) throws CertificateException {
|
|
||||||
// Always trust - it is an example.
|
// Always trust - it is an example.
|
||||||
// You should do something in the real world.
|
// You should do something in the real world.
|
||||||
// You will reach here only if you enabled client certificate auth,
|
// You will reach here only if you enabled client certificate auth,
|
||||||
@ -47,8 +44,7 @@ public class SecureChatTrustManagerFactory extends TrustManagerFactorySpi {
|
|||||||
"UNKNOWN CLIENT CERTIFICATE: " + chain[0].getSubjectDN());
|
"UNKNOWN CLIENT CERTIFICATE: " + chain[0].getSubjectDN());
|
||||||
}
|
}
|
||||||
|
|
||||||
public void checkServerTrusted(
|
public void checkServerTrusted(X509Certificate[] chain, String authType) {
|
||||||
X509Certificate[] chain, String authType) throws CertificateException {
|
|
||||||
// Always trust - it is an example.
|
// Always trust - it is an example.
|
||||||
// You should do something in the real world.
|
// You should do something in the real world.
|
||||||
System.err.println(
|
System.err.println(
|
||||||
|
@ -27,6 +27,7 @@ import java.util.regex.Pattern;
|
|||||||
*/
|
*/
|
||||||
public final class SystemPropertyUtil {
|
public final class SystemPropertyUtil {
|
||||||
|
|
||||||
|
@SuppressWarnings("all")
|
||||||
private static boolean initializedLogger;
|
private static boolean initializedLogger;
|
||||||
private static final InternalLogger logger;
|
private static final InternalLogger logger;
|
||||||
private static boolean loggedException;
|
private static boolean loggedException;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user