mirror of
https://github.com/magefree/mage.git
synced 2025-12-24 12:31:59 -08:00
remove redundant null checks before instanceof
This commit is contained in:
parent
d3aea0270c
commit
f04d7c9b03
72 changed files with 184 additions and 186 deletions
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue