luoyuxia commented on code in PR #22831: URL: https://github.com/apache/flink/pull/22831#discussion_r1246244925
########## flink-connectors/flink-connector-files/src/main/java/org/apache/flink/connector/file/table/PartitionCommitPolicyFactory.java: ########## @@ -63,11 +70,26 @@ public List<PartitionCommitPolicy> createPolicyChain( successFileName, fsSupplier.get()); case PartitionCommitPolicy.CUSTOM: try { - return (PartitionCommitPolicy) - cl.loadClass(customClass).newInstance(); + if (!CollectionUtil.isNullOrEmpty(parameters)) { Review Comment: The ci fail in here. ``` Jun 29 04:30:25 04:30:25.403 [ERROR] Architecture Violation [Priority: MEDIUM] - Rule 'Connector production code must depend only on public API when outside of connector packages' was violated (1 times): Jun 29 04:30:25 Method <org.apache.flink.connector.file.table.PartitionCommitPolicyFactory.createPolicyChain(java.lang.ClassLoader, java.util.function.Supplier)> calls method <org.apache.flink.util.CollectionUtil.isNullOrEmpty(java.util.Collection)> in (PartitionCommitPolicyFactory.java:73) ``` Seems we can't call `CollectionUtil.isNullOrEmpty` in here. ########## flink-connectors/flink-connector-files/src/main/java/org/apache/flink/connector/file/table/PartitionCommitPolicyFactory.java: ########## @@ -63,11 +70,26 @@ public List<PartitionCommitPolicy> createPolicyChain( successFileName, fsSupplier.get()); case PartitionCommitPolicy.CUSTOM: try { - return (PartitionCommitPolicy) - cl.loadClass(customClass).newInstance(); + if (!CollectionUtil.isNullOrEmpty(parameters)) { Review Comment: ``` parameters != null && !parameters.isEmpty() ``` -- 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: issues-unsubscr...@flink.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org