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


##########
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:
   @bobpaulin I'm going to disagree here, for 2 reasons. Firstly, I don't like 
using `Optional` in private methods - you can agree or disagree, that's a 
matter of taste, I suppose. But secondly, the class already has several other 
methods that return `null` objects. We should not mix and match returning 
`Optional` because if this is switched to `Optional` it implies that the class 
makes use of `Optional` and the other methods should not return `null` values, 
and that will actually lead to more 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