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


##########
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:
   @markap14 I won't argue on taste and I won't argue that optional should be 
used in all cases instead of null.   This PR introduces 2 additional methods 
that used to NOT return null (they used to be void) so they did not have this 
behavior before.  Additionally other classes around this one for example 
AssetManager [1] do use Optional.  Granted those methods are public on an 
interface it does establish some precedence for Asset based classes using 
Optional.  Perhaps it's a bit of a nit but does seem like it would be a better 
fit here given the above reasoning.
   
   
   [1] 
https://github.com/apache/nifi/blob/main/nifi-framework-api/src/main/java/org/apache/nifi/asset/AssetManager.java



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