featzhang commented on code in PR #7869:
URL: https://github.com/apache/inlong/pull/7869#discussion_r1168565556


##########
inlong-manager/manager-common/src/main/java/org/apache/inlong/manager/common/util/Preconditions.java:
##########
@@ -153,6 +155,17 @@ public static void expectNotBlank(String obj, 
ErrorCodeEnum errorCodeEnum, Strin
         }
     }
 
+    public static void expectBlank(String obj, ErrorCodeEnum errorCodeEnum, 
String errMsg) {
+        if (StringUtils.isNotBlank(obj)) {
+            throw new BusinessException(errorCodeEnum, errMsg);
+        }
+    }
+    public static void expectBlank(List<String> obj, ErrorCodeEnum 
errorCodeEnum, String errMsg) {

Review Comment:
   Fixed



##########
inlong-manager/manager-common/src/main/java/org/apache/inlong/manager/common/tool/excel/ExcelTool.java:
##########
@@ -457,6 +477,27 @@ private static String parseCellValue(Cell cell) {
         return cellValue;
     }
 
+    /**
+     * Validate the cell value of a given field in the Excel sheet
+     *
+     * @param fieldMeta the meta information of the field to validate
+     * @param value     the value of the field to validate
+     */
+    private static Optional<String> validateCellValue(
+            FieldMeta fieldMeta,
+            Object value) {
+        ExcelCellValidator cellValidator = fieldMeta.getCellValidator();
+        if (cellValidator != null) {

Review Comment:
   Fixed



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