Source:
<code>private boolean updateBlobMetadata(BlobId blobId, String fieldName, Object value) throws CloudStorageException { Objects.requireNonNull(blobId, "BlobId cannot be null"); Objects.requireNonNull(fieldName, "Field name cannot be null"); try { CloudBlobContainer azureContainer = getContainer(blobId, false); String azureBlobName = getAzureBlobName(blobId); CloudBlockBlob azureBlob = azureContainer.getBlockBlobReference(azureBlobName); if (!azureBlob.exists()) { logger.debug("Blob not found in Azure container {}.", blobId, azureContainer.getName()); return false; } Timer.Context storageTimer = azureMetrics.blobUpdateTime.time(); try { azureBlob.downloadAttributes(); String textValue = String.valueOf(value); if (!textValue.equals(azureBlob.getMetadata().get(fieldName))) { azureBlob.getMetadata().put(fieldName, textValue); azureBlob.uploadMetadata(); } } finally { storageTimer.stop(); } ResourceResponse<Document> response = cosmosDataAccessor.readMetadata(blobId); Document doc = response.getResource(); if (doc == null) { <START> logger.warn("Blob metadata record not found: " + blobId.getID()); <END> return false; } if (!value.equals(doc.get(fieldName))) { doc.set(fieldName, value); cosmosDataAccessor.replaceMetadata(blobId, doc); } logger.debug("Updated blob metadata set to {}.", blobId, fieldName, value); azureMetrics.blobUpdatedCount.inc(); return true; } catch (URISyntaxException | StorageException | DocumentClientException e) { azureMetrics.blobUpdateErrorCount.inc(); updateErrorMetrics(e); throw new CloudStorageException("Error updating blob metadata: " + blobId, e); } }</code><technical_language>{}? logger.warn("Blob metadata record found: {}", blobId.getID());</technical_language>

Target:
private boolean updateBlobMetadata(BlobId blobId, String fieldName, Object value) throws CloudStorageException { Objects.requireNonNull(blobId, "BlobId cannot be null"); Objects.requireNonNull(fieldName, "Field name cannot be null"); try { CloudBlobContainer azureContainer = getContainer(blobId, false); String azureBlobName = getAzureBlobName(blobId); CloudBlockBlob azureBlob = azureContainer.getBlockBlobReference(azureBlobName); if (!azureBlob.exists()) { logger.debug("Blob not found in Azure container {}.", blobId, azureContainer.getName()); return false; } Timer.Context storageTimer = azureMetrics.blobUpdateTime.time(); try { azureBlob.downloadAttributes(); String textValue = String.valueOf(value); if (!textValue.equals(azureBlob.getMetadata().get(fieldName))) { azureBlob.getMetadata().put(fieldName, textValue); azureBlob.uploadMetadata(); } } finally { storageTimer.stop(); } ResourceResponse<Document> response = cosmosDataAccessor.readMetadata(blobId); Document doc = response.getResource(); if (doc == null) { logger.warn("Blob metadata record not found: {}", blobId.getID()); return false; } if (!value.equals(doc.get(fieldName))) { doc.set(fieldName, value); cosmosDataAccessor.replaceMetadata(blobId, doc); } logger.debug("Updated blob metadata set to {}.", blobId, fieldName, value); azureMetrics.blobUpdatedCount.inc(); return true; } catch (URISyntaxException | StorageException | DocumentClientException e) { azureMetrics.blobUpdateErrorCount.inc(); updateErrorMetrics(e); throw new CloudStorageException("Error updating blob metadata: " + blobId, e); } }