bobpaulin commented on code in PR #10779:
URL: https://github.com/apache/nifi/pull/10779#discussion_r2699821131


##########
nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/asset/StandardAssetSynchronizer.java:
##########
@@ -193,19 +220,20 @@ private AssetsEntity listAssets(final AssetsRestApiClient 
assetsRestApiClient, f
         }
     }
 
-    private void synchronizeAssetWithRetry(final AssetsRestApiClient 
assetsRestApiClient, final String parameterContextId, final AssetDTO 
coordinatorAsset) {
+    private Asset synchronizeAssetWithRetry(final AssetsRestApiClient 
assetsRestApiClient, final String parameterContextId, final AssetDTO 
coordinatorAsset) {

Review Comment:
   ```suggestion
       private Optional<Asset> synchronizeAssetWithRetry(final 
AssetsRestApiClient assetsRestApiClient, final String parameterContextId, final 
AssetDTO coordinatorAsset) {
   ```
   
   Rather than returning null here (and in upstream methods) an Optional be 
used to help prevent future NullPointerExceptions.



-- 
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