yandrey321 commented on code in PR #9427:
URL: https://github.com/apache/ozone/pull/9427#discussion_r2603621307


##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/PrefixManagerImpl.java:
##########
@@ -319,29 +326,32 @@ private void inheritParentAcl(OzoneObj ozoneObj, 
OmPrefixInfo prefixInfo)
 
   public OMPrefixAclOpResult setAcl(OzoneObj ozoneObj, List<OzoneAcl> 
ozoneAcls,
       OmPrefixInfo prefixInfo, long transactionLogIndex) throws IOException {
-    boolean newPrefix = false;
-    if (prefixInfo == null) {
-      OmPrefixInfo.Builder prefixInfoBuilder =
-          new OmPrefixInfo.Builder()
-              .setName(ozoneObj.getPath());
-      if (transactionLogIndex > 0) {
-        prefixInfoBuilder.setObjectID(OmUtils.getObjectIdFromTxId(
-            metadataManager.getOmEpoch(), transactionLogIndex));
-        prefixInfoBuilder.setUpdateID(transactionLogIndex);
-      }
-      prefixInfo = prefixInfoBuilder.build();
-      newPrefix = true;
+    boolean newPrefix = prefixInfo == null;

Review Comment:
   if is more readable



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to