{"record":{"id":"66727ccad76d0a55","repo":"alibaba/DataX","slug":"list","errorCode":null,"errorMessage":"您提供的作业配置有误, List不能为空.","messagePattern":"您提供的作业配置有误, List不能为空\\.","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"common/src/main/java/com/alibaba/datax/common/util/ListUtil.java","lineNumber":36,"sourceCode":"    public static boolean checkIfValueDuplicate(List<String> aList,\n                                                boolean caseSensitive) {\n        if (null == aList || aList.isEmpty()) {\n            throw DataXException.asDataXException(CommonErrorCode.CONFIG_ERROR,\n                    \"您提供的作业配置有误，List不能为空.\");\n        }\n\n        try {\n            makeSureNoValueDuplicate(aList, caseSensitive);\n        } catch (Exception e) {\n            return true;\n        }\n        return false;\n    }\n\n    public static void makeSureNoValueDuplicate(List<String> aList,\n                                                boolean caseSensitive) {\n        if (null == aList || aList.isEmpty()) {\n            throw new IllegalArgumentException(\"您提供的作业配置有误, List不能为空.\");\n        }\n\n        if (1 == aList.size()) {\n            return;\n        } else {\n            List<String> list = null;\n            if (!caseSensitive) {\n                list = valueToLowerCase(aList);\n            } else {\n                list = new ArrayList<String>(aList);\n            }\n\n            Collections.sort(list);\n\n            for (int i = 0, len = list.size() - 1; i < len; i++) {\n                if (list.get(i).equals(list.get(i + 1))) {\n                    throw DataXException\n                            .asDataXException(","sourceCodeStart":18,"sourceCodeEnd":54,"githubUrl":"https://github.com/alibaba/DataX/blob/80ec23d5c5328eb90ca364d2749e92dfaf44541e/common/src/main/java/com/alibaba/datax/common/util/ListUtil.java#L18-L54","documentation":"Thrown by ListUtil.makeSureNoValueDuplicate when the provided List<String> is null or empty. Despite the method's purpose (duplicate detection), its first guard rejects empty/null input as an invalid job configuration, reflecting DataX's assumption that such lists (e.g. column lists) must be non-empty. Note isListHasDuplicate swallows this and returns true.","triggerScenarios":"Calling makeSureNoValueDuplicate(aList, caseSensitive) with a null or empty list — e.g. validating a column configuration where the user specified an empty \"column\": [].","commonSituations":"Job config with \"column\": [] or omitted column list reaching validation; programmatic callers passing a filtered-then-empty list; expecting the duplicate-checker to be a no-op on empty input.","solutions":["Populate the list (e.g. add column names) in the job configuration","If calling programmatically, guard with an isEmpty check before invoking and handle the empty case in your own logic","Verify upstream parsing didn't drop the list contents (wrong key name returning empty)"],"exampleFix":"// before\nListUtil.makeSureNoValueDuplicate(columns, true); // columns == []\n// after\nif (columns != null && !columns.isEmpty()) {\n    ListUtil.makeSureNoValueDuplicate(columns, true);\n}","handlingStrategy":"validation","validationCode":"if (aList == null || aList.isEmpty()) { /* treat as config error with your own clear message */ }","typeGuard":"boolean isNonEmptyList(List<String> l) { return l != null && !l.isEmpty(); }","tryCatchPattern":"catch (IllegalArgumentException e) {\n  if (\"您提供的作业配置有误, List不能为空.\".equals(e.getMessage())) { /* populate the list in config */ }\n  throw e;\n}","preventionTips":["Require non-empty column lists in job config validation","Check list emptiness before calling ListUtil strict helpers"],"tags":["datax","validation","configuration","list"],"backgroundTag":null,"analyzedSha":"80ec23d5c5328eb90ca364d2749e92dfaf44541e","analyzedAt":"2026-08-14T15:33:51.187Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}