You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@seatunnel.apache.org by GitBox <gi...@apache.org> on 2022/03/25 08:23:18 UTC

[GitHub] [incubator-seatunnel] ruanwenjun commented on a change in pull request #1562: [Chore]Modify some wrong or non-standard code

ruanwenjun commented on a change in pull request #1562:
URL: https://github.com/apache/incubator-seatunnel/pull/1562#discussion_r835043846



##########
File path: seatunnel-core/seatunnel-core-base/src/main/java/org/apache/seatunnel/command/BaseTaskExecuteCommand.java
##########
@@ -85,7 +85,7 @@ protected final void close(List<? extends Plugin<E>>... plugins) {
             for (Plugin<E> plugin : pluginList) {
                 try (Plugin<?> closed = plugin) {
                     // ignore
-                } catch (Throwable e) {
+                } catch (Exception e) {

Review comment:
       As discussed at #1530, catch `Throwable` is better.

##########
File path: seatunnel-connectors/seatunnel-connectors-flink/seatunnel-connector-flink-doris/src/main/java/org/apache/seatunnel/flink/sink/DorisStreamLoad.java
##########
@@ -104,7 +104,7 @@ public void load(String value) {
     private LoadResponse loadBatch(String data) {
         String formatDate = new SimpleDateFormat("yyyyMMdd_HHmmss").format(new Date());
         String label = String.format("flink_sink_%s_%s", formatDate,
-                UUID.randomUUID().toString().replaceAll("-", ""));
+                UUID.randomUUID().toString().replace("-", ""));

Review comment:
       The UUID will generate String with 4 `-`, maybe use `replaceAll` is more reasonable?




-- 
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: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org