ChenSammi commented on code in PR #8953:
URL: https://github.com/apache/ozone/pull/8953#discussion_r2297192406


##########
hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/om/helpers/OmLifecycleConfiguration.java:
##########
@@ -286,7 +284,11 @@ public Builder setUpdateID(long uID) {
     }
 
     public OmLifecycleConfiguration build() throws OMException {
-      OmLifecycleConfiguration omLifecycleConfiguration = new 
OmLifecycleConfiguration(this);
+      return new OmLifecycleConfiguration(this);
+    }
+
+    public OmLifecycleConfiguration buildAndValid() throws OMException {
+      OmLifecycleConfiguration omLifecycleConfiguration = build();

Review Comment:
   Can all places using buildAndValid, and rename to build?  I know some places 
validation is not required, but have a single build with validation will make 
the logic simple, and strong error prevention.
   
   Besides this comment, the rest looks good to me. 



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