krishnaasawa1 commented on code in PR #4531:
URL: https://github.com/apache/ozone/pull/4531#discussion_r1162286994


##########
hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/om/helpers/OmDirectoryInfo.java:
##########
@@ -266,4 +267,26 @@ public OmDirectoryInfo copyObject() {
 
     return builder.build();
   }
+
+  /**
+   * Return a new copy of the object.
+   */
+  @Override
+  public Object clone() throws CloneNotSupportedException {

Review Comment:
   I still have few questions here
   1-CopyObject is implemented extensively in Ozone infor multiple 
classes.Seems the practice is wherever deep copy of object is required 
CopyObject is called.
   Here where the issue is happening i.e in Liststatus method instead of making 
this change call CopyObject . For OmkeyInfo itself I can see couple of usages 
of CopyObject.
   2- Also in case still we to implement this , is Clone way better or using 
copy constructor is better which removes overhead of implementing clonable and 
typecasting .



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