{"record":{"id":"3b627b1f8740d1ad","repo":"apache/seatunnel","slug":"condition-operator-must-not-be-null","errorCode":null,"errorMessage":"Condition operator must not be null","messagePattern":"Condition operator must not be null","errorType":"validation","errorClass":"java.lang.IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"seatunnel-api/src/main/java/org/apache/seatunnel/api/configuration/util/Condition.java","lineNumber":58,"sourceCode":"        this(option, ConditionOperator.EQUAL, expectValue, null, null);\n    }\n\n    Condition(\n            Option<T> option, ConditionOperator operator, T expectValue, Option<?> compareOption) {\n        this(option, operator, expectValue, compareOption, null);\n    }\n\n    Condition(\n            Option<T> option,\n            ConditionOperator operator,\n            T expectValue,\n            Option<?> compareOption,\n            ConditionExtension<T> extension) {\n        if (option == null) {\n            throw new IllegalArgumentException(\"Condition option must not be null\");\n        }\n        if (operator == null) {\n            throw new IllegalArgumentException(\"Condition operator must not be null\");\n        }\n        if (operator.getSource() == ConditionOperator.Source.FIELD && compareOption == null) {\n            throw new IllegalArgumentException(\n                    String.format(\n                            \"Operator %s requires a compareOption (cross-field comparison), but compareOption is null\",\n                            operator.name()));\n        }\n        if (operator.getArity() == ConditionOperator.Arity.BINARY\n                && operator.getSource() == ConditionOperator.Source.LITERAL\n                && expectValue == null) {\n            throw new IllegalArgumentException(\n                    String.format(\n                            \"Operator %s requires an expectValue, but expectValue is null\",\n                            operator.name()));\n        }\n        if (operator == ConditionOperator.EXTENSION && extension == null) {\n            throw new IllegalArgumentException(\n                    \"Operator EXTENSION requires a non-null ConditionExtension\");","sourceCodeStart":40,"sourceCodeEnd":76,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-api/src/main/java/org/apache/seatunnel/api/configuration/util/Condition.java#L40-L76","documentation":"ExcelReadStrategy.getPoiExcelMaxFileSize reads the poi_excel_max_file_size option (falling back to its default) and validates it is strictly greater than 0. A non-positive value would make the POI file-size guard meaningless, so it throws FileConnectorException with ILLEGAL_ARGUMENT before any file is read.","triggerScenarios":"getPoiExcelMaxFileSize (called from maxFileSize/maxBytesForEntry and the POI read path) encounters poi_excel_max_file_size <= 0 in plugin_config, e.g. 0, -1, or a negative expression result.","commonSituations":"Trying to 'disable' the limit by setting it to 0; templated configs where the byte value is computed and can go negative; misunderstanding that the option is a ratio or flag rather than a byte size.","solutions":["Set poi_excel_max_file_size to a positive byte value, e.g. 104857600 for 100MB.","Remove the option to use the default limit instead of setting 0.","To effectively bypass the limit for huge POI files, set a very large positive value and size worker heap accordingly."],"exampleFix":"// before\npoi_excel_max_file_size = 0\n// after\npoi_excel_max_file_size = 104857600","handlingStrategy":"validation","validationCode":"java\nif (pluginConfig.hasPath(\"poi_excel_max_file_size\")\n        && pluginConfig.getLong(\"poi_excel_max_file_size\") <= 0) {\n    throw new IllegalArgumentException(\"poi_excel_max_file_size must be > 0 (bytes)\");\n}","typeGuard":null,"tryCatchPattern":"java\ntry {\n    reader.readProcess(split);\n} catch (FileConnectorException e) {\n    if (e.getMessage().contains(\"must be greater than 0\")) {\n        LOG.error(\"Fix poi_excel_max_file_size — it is a byte size, must be positive\", e);\n    }\n}","preventionTips":["Never use 0 or negative values to 'disable' the limit — use a large positive value or switch engines","Treat poi_excel_max_file_size as bytes in all config templates","Add config linting that asserts positivity for size options"],"tags":["excel","configuration","validation","poi"],"backgroundTag":"invalid-config-value","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}