Copilot commented on code in PR #9070:
URL: https://github.com/apache/seatunnel/pull/9070#discussion_r2044013526


##########
seatunnel-connectors-v2/connector-jdbc/src/main/java/org/apache/seatunnel/connectors/seatunnel/jdbc/sink/JdbcSinkAggregatedCommitter.java:
##########
@@ -39,15 +39,19 @@
 public class JdbcSinkAggregatedCommitter
         implements SinkAggregatedCommitter<XidInfo, JdbcAggregatedCommitInfo> {
 
-    private final XaFacade xaFacade;
-    private final XaGroupOps xaGroupOps;
+    private XaFacade xaFacade;

Review Comment:
   Removing the 'final' modifier for xaFacade (and similarly for xaGroupOps) 
means the fields are mutable until init() is called. Document the requirement 
that init() must be invoked immediately after construction to prevent 
unintended usage.



##########
seatunnel-connectors-v2/connector-iceberg/src/main/java/org/apache/seatunnel/connectors/seatunnel/iceberg/sink/commit/IcebergAggregatedCommitter.java:
##########
@@ -33,10 +33,18 @@
 public class IcebergAggregatedCommitter
         implements SinkAggregatedCommitter<IcebergCommitInfo, 
IcebergAggregatedCommitInfo> {
 
-    private final IcebergTableLoader tableLoader;
-    private final IcebergFilesCommitter filesCommitter;
+    private IcebergTableLoader tableLoader;

Review Comment:
   Changing tableLoader and filesCommitter from 'final' to non-final implies 
these members rely on an explicit init() call. Ensure that the documentation or 
comments clarify that init() must be called before any other methods are used.



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