Source:
private Message newMessage(InputStream inputStream, StoreKey newKey, MessageInfo oldMessageInfo) throws IOException, MessageFormatException { MessageHeader_Format headerFormat = getMessageHeader(inputStream); storeKeyFactory.getStoreKey(new DataInputStream(inputStream)); BlobId newBlobId = (BlobId) newKey; if (headerFormat.isPutRecord()) { ByteBuffer blobEncryptionKey = null; if (headerFormat.hasEncryptionKeyRecord()) { blobEncryptionKey = deserializeBlobEncryptionKey(inputStream); } BlobProperties oldProperties = deserializeBlobProperties(inputStream); BlobProperties newProperties = new BlobProperties(oldProperties.getBlobSize(), oldProperties.getServiceId(), oldProperties.getOwnerId(), oldProperties.getContentType(), oldProperties.isPrivate(), oldProperties.getTimeToLiveInSeconds(), oldProperties.getCreationTimeInMs(), newBlobId.getAccountId(), newBlobId.getContainerId(), oldProperties.isEncrypted()); ByteBuffer userMetaData = deserializeUserMetadata(inputStream); BlobData blobData = deserializeBlob(inputStream); PutMessageFormatInputStream putMessageFormatInputStream = new PutMessageFormatInputStream(newKey, blobEncryptionKey, newProperties, userMetaData, blobData.getStream(), blobData.getSize(), blobData.getBlobType()); Long crc = oldMessageInfo.getStoreKey().getID().equals(newKey.getID()) ? oldMessageInfo.getCrc() : null; MessageInfo info = new MessageInfo(newKey, putMessageFormatInputStream.getSize(), false, oldMessageInfo.isTtlUpdated(), oldMessageInfo.getExpirationTimeInMs(), crc, newProperties.getAccountId(), newProperties.getContainerId(), oldMessageInfo.getOperationTimeMs()); return new Message(info, putMessageFormatInputStream); } else { throw new IllegalArgumentException("Only 'put' records are valid"); } }

Target:
private Message newMessage(InputStream inputStream, StoreKey newKey, MessageInfo oldMessageInfo) throws IOException, MessageFormatException { MessageHeader_Format headerFormat = getMessageHeader(inputStream); storeKeyFactory.getStoreKey(new DataInputStream(inputStream)); BlobId newBlobId = (BlobId) newKey; if (headerFormat.isPutRecord()) { ByteBuffer blobEncryptionKey = null; if (headerFormat.hasEncryptionKeyRecord()) { blobEncryptionKey = deserializeBlobEncryptionKey(inputStream); } BlobProperties oldProperties = deserializeBlobProperties(inputStream); BlobProperties newProperties = new BlobProperties(oldProperties.getBlobSize(), oldProperties.getServiceId(), oldProperties.getOwnerId(), oldProperties.getContentType(), oldProperties.isPrivate(), oldProperties.getTimeToLiveInSeconds(), oldProperties.getCreationTimeInMs(), newBlobId.getAccountId(), newBlobId.getContainerId(), oldProperties.isEncrypted()); ByteBuffer userMetaData = deserializeUserMetadata(inputStream); BlobData blobData = deserializeBlob(inputStream); PutMessageFormatInputStream putMessageFormatInputStream = new PutMessageFormatInputStream(newKey, blobEncryptionKey, newProperties, userMetaData, blobData.getStream(), blobData.getSize(), blobData.getBlobType()); Long originalCrc = oldMessageInfo.getStoreKey().getID().equals(newKey.getID()) ? oldMessageInfo.getCrc() : null; MessageInfo info = new MessageInfo(newKey, putMessageFormatInputStream.getSize(), false, oldMessageInfo.isTtlUpdated(), oldMessageInfo.getExpirationTimeInMs(), originalCrc, newProperties.getAccountId(), newProperties.getContainerId(), oldMessageInfo.getOperationTimeMs()); return new Message(info, putMessageFormatInputStream); } else { throw new IllegalArgumentException("Only 'put' records are valid"); } }