zhoujinsong commented on code in PR #4116:
URL: https://github.com/apache/amoro/pull/4116#discussion_r2911176592


##########
amoro-ams/src/main/java/org/apache/amoro/server/process/ProcessService.java:
##########
@@ -546,6 +506,17 @@ protected void doDispose() {
     }
   }
 
+  @VisibleForTesting

Review Comment:
   Using `public final` fields directly in `TableProcessHolder` breaks 
encapsulation. Callers are already accessing `holder.store` and 
`holder.process` throughout the codebase, which will make it hard to change 
later.
   
   Please consider using getter methods instead:
   ```java
   public static class TableProcessHolder {
       private final TableProcess process;
       private final TableProcessStore store;
   
       public TableProcess getProcess() { return process; }
       public TableProcessStore getStore() { return store; }
   }
   ```
   Or use a Java `record` if the project targets Java 16+.



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