remove redundant null checks before instanceof

This commit is contained in:
Ingmar Goudt 2018-09-17 21:09:42 +02:00
parent d3aea0270c
commit f04d7c9b03
72 changed files with 184 additions and 186 deletions

View file

@ -225,7 +225,7 @@ public class Connection {
for (InterfaceAddress addr : iface.getInterfaceAddresses()) {
if (addr != null) {
InetAddress iaddr = addr.getAddress();
if (iaddr != null && iaddr instanceof Inet4Address) {
if (iaddr instanceof Inet4Address) {
return iaddr;
}
}

View file

@ -39,7 +39,7 @@ public final class CompressUtil {
* @return Decompressed object
*/
public static Object decompress(Object data) {
if (data == null || !(data instanceof ZippedObject)) {
if (!(data instanceof ZippedObject)) {
return data;
}
return ((ZippedObject) data).unzip();