Source:
<code>public void applyUpdatesToBlobInLocalStore(MessageInfo messageInfo, RemoteReplicaInfo remoteReplicaInfo, BlobId localKey, MessageInfo localMessageInfo) throws StoreException { if (localMessageInfo == null) { <START> throw new StoreException("Key " + localKey + " not found in store.", StoreErrorCodes.ID_Not_Found); <END> } boolean deletedLocally = localMessageInfo.isDeleted(); boolean ttlUpdatedLocally = localMessageInfo.isTtlUpdated(); short localLifeVersion = localMessageInfo.getLifeVersion(); short remoteLifeVersion = messageInfo.getLifeVersion(); if (localLifeVersion > remoteLifeVersion) { } else if (localLifeVersion == remoteLifeVersion) { if (!deletedLocally) { MessageInfo info = new MessageInfo(localKey, 0, localKey.getAccountId(), localKey.getContainerId(), messageInfo.getOperationTimeMs(), remoteLifeVersion); if (messageInfo.isTtlUpdated() && !ttlUpdatedLocally) { applyTtlUpdate(info, remoteReplicaInfo); } if (messageInfo.isDeleted()) { applyDelete(info, remoteReplicaInfo); } } } else { MessageInfo info = new MessageInfo(localKey, 0, localKey.getAccountId(), localKey.getContainerId(), messageInfo.getOperationTimeMs(), remoteLifeVersion); boolean shouldInsertTtlUpdate = false; if (messageInfo.isTtlUpdated() && !ttlUpdatedLocally) { if (messageInfo.isDeleted()) { if (deletedLocally) { applyUndelete(info, remoteReplicaInfo); } applyTtlUpdate(info, remoteReplicaInfo); } else { shouldInsertTtlUpdate = true; } } if (messageInfo.isDeleted()) { applyDelete(info, remoteReplicaInfo); } else { applyUndelete(info, remoteReplicaInfo); if (shouldInsertTtlUpdate) { applyTtlUpdate(info, remoteReplicaInfo); } } } }</code><technical_language>I move this check calling method, do Objects.assertNonNull() here</technical_language>

Target:
public void applyUpdatesToBlobInLocalStore(MessageInfo messageInfo, RemoteReplicaInfo remoteReplicaInfo, BlobId localKey, MessageInfo localMessageInfo) throws StoreException { if (localMessageInfo == null) { throw new StoreException(String.format("Key %s not found in store.", localKey.getID()), StoreErrorCodes.ID_Not_Found); } boolean deletedLocally = localMessageInfo.isDeleted(); boolean ttlUpdatedLocally = localMessageInfo.isTtlUpdated(); short localLifeVersion = localMessageInfo.getLifeVersion(); short remoteLifeVersion = messageInfo.getLifeVersion(); if (localLifeVersion > remoteLifeVersion) { } else if (localLifeVersion == remoteLifeVersion) { if (!deletedLocally) { MessageInfo info = new MessageInfo(localKey, 0, localKey.getAccountId(), localKey.getContainerId(), messageInfo.getOperationTimeMs(), remoteLifeVersion); if (messageInfo.isTtlUpdated() && !ttlUpdatedLocally) { applyTtlUpdate(info, remoteReplicaInfo); } if (messageInfo.isDeleted()) { applyDelete(info, remoteReplicaInfo); } } } else { MessageInfo info = new MessageInfo(localKey, 0, localKey.getAccountId(), localKey.getContainerId(), messageInfo.getOperationTimeMs(), remoteLifeVersion); boolean shouldInsertTtlUpdate = false; if (messageInfo.isTtlUpdated() && !ttlUpdatedLocally) { if (messageInfo.isDeleted()) { if (deletedLocally) { applyUndelete(info, remoteReplicaInfo); } applyTtlUpdate(info, remoteReplicaInfo); } else { shouldInsertTtlUpdate = true; } } if (messageInfo.isDeleted()) { applyDelete(info, remoteReplicaInfo); } else { applyUndelete(info, remoteReplicaInfo); if (shouldInsertTtlUpdate) { applyTtlUpdate(info, remoteReplicaInfo); } } } }