Remove redundant throws clauses / Suppress inspections for some false positives
This commit is contained in:
parent
211b4059b1
commit
958d04a42b
@ -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;
|
||||||
|
@ -15,16 +15,14 @@
|
|||||||
*/
|
*/
|
||||||
package io.netty.example.securechat;
|
package io.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
|
||||||
@ -39,8 +37,7 @@ public class SecureChatTrustManagerFactory extends TrustManagerFactorySpi {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
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,
|
||||||
@ -50,8 +47,7 @@ public class SecureChatTrustManagerFactory extends TrustManagerFactorySpi {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
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(
|
||||||
|
@ -43,7 +43,6 @@ import java.security.InvalidAlgorithmParameterException;
|
|||||||
import java.security.KeyStore;
|
import java.security.KeyStore;
|
||||||
import java.security.KeyStoreException;
|
import java.security.KeyStoreException;
|
||||||
import java.security.Security;
|
import java.security.Security;
|
||||||
import java.security.cert.CertificateException;
|
|
||||||
import java.security.cert.X509Certificate;
|
import java.security.cert.X509Certificate;
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
import java.util.concurrent.atomic.AtomicBoolean;
|
import java.util.concurrent.atomic.AtomicBoolean;
|
||||||
@ -275,14 +274,12 @@ public class SocketSslEchoTest extends AbstractSocketTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void checkClientTrusted(
|
public void checkClientTrusted(X509Certificate[] chain, String authType) {
|
||||||
X509Certificate[] chain, String authType) throws CertificateException {
|
|
||||||
// NOOP
|
// NOOP
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void checkServerTrusted(
|
public void checkServerTrusted(X509Certificate[] chain, String authType) {
|
||||||
X509Certificate[] chain, String authType) throws CertificateException {
|
|
||||||
// NOOP
|
// NOOP
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -23,6 +23,7 @@ import java.nio.channels.spi.AbstractSelectableChannel;
|
|||||||
import java.nio.channels.spi.SelectorProvider;
|
import java.nio.channels.spi.SelectorProvider;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
|
@SuppressWarnings("all")
|
||||||
public abstract class SctpChannel extends AbstractSelectableChannel {
|
public abstract class SctpChannel extends AbstractSelectableChannel {
|
||||||
static {
|
static {
|
||||||
UnsupportedOperatingSystemException.raise();
|
UnsupportedOperatingSystemException.raise();
|
||||||
|
@ -27,7 +27,7 @@ public abstract class SctpServerChannel extends AbstractSelectableChannel {
|
|||||||
UnsupportedOperatingSystemException.raise();
|
UnsupportedOperatingSystemException.raise();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static SctpServerChannel open() throws IOException {
|
public static SctpServerChannel open() {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user