fix judge error (#1116)

This commit is contained in:
lican 2018-04-25 15:19:09 +08:00 committed by 吴晟 Wu Sheng
parent 7197030669
commit adc2929354
1 changed files with 2 additions and 1 deletions

View File

@ -32,6 +32,7 @@ import org.apache.skywalking.apm.collector.core.util.Const;
import org.apache.skywalking.apm.collector.storage.table.register.NetworkAddress;
import static java.util.Objects.isNull;
import static java.util.Objects.nonNull;
/**
* @author peng-yongsheng
@ -122,7 +123,7 @@ public class NetworkAddressIDService implements INetworkAddressIDService {
private boolean compare(int addressId, int spanLayer, int serverType) {
NetworkAddress networkAddress = networkAddressCacheService.getAddress(addressId);
if (isNull(networkAddress)) {
if (nonNull(networkAddress)) {
return spanLayer == networkAddress.getSrcSpanLayer() && serverType == networkAddress.getServerType();
}
return true;