bbende commented on code in PR #11965:
URL: https://github.com/apache/nifi/pull/11965#discussion_r4680327548


##########
nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/asset/StandardAssetSynchronizer.java:
##########
@@ -184,6 +295,11 @@ private Asset synchronize(final AssetsRestApiClient 
assetsRestApiClient, final P
             logger.info("Synchronizing missing asset [id={},name={}] for 
parameter context [{}]", assetId, assetName, paramContextId);
             return synchronizeAssetWithRetry(assetsRestApiClient, 
paramContextId, coordinatorAsset);
         } else {
+            if (Boolean.TRUE.equals(coordinatorAsset.getMissingContent())) {
+                logger.warn("Cluster coordinator is missing content for asset 
[id={},name={}] in parameter context [{}]: keeping local asset file", assetId, 
assetName, paramContextId);

Review Comment:
   The files on disk end up the same with or without the guard. The old 
NullPointerException was already caught by the per-asset try/catch in the loop, 
which logged it at ERROR and left the local file alone. The guard only replaces 
a stack trace with a clear warning. A test would have to assert on a log line 
or call a private method, and the guard is three lines. 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to