{"record":{"id":"4f810a0c4ba14a1f","repo":"apache/hadoop","slug":"integer-range-badly-formed","errorCode":null,"errorMessage":"integer range badly formed: {}","messagePattern":"integer range badly formed: (.+?)","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/conf/Configuration.java","lineNumber":2185,"sourceCode":"\n      @Override\n      public void remove() {\n        throw new UnsupportedOperationException();\n      }\n    };\n\n    List<Range> ranges = new ArrayList<Range>();\n    \n    public IntegerRanges() {\n    }\n    \n    public IntegerRanges(String newValue) {\n      StringTokenizer itr = new StringTokenizer(newValue, \",\");\n      while (itr.hasMoreTokens()) {\n        String rng = itr.nextToken().trim();\n        String[] parts = rng.split(\"-\", 3);\n        if (parts.length < 1 || parts.length > 2) {\n          throw new IllegalArgumentException(\"integer range badly formed: \" + \n                                             rng);\n        }\n        Range r = new Range();\n        r.start = convertToInt(parts[0], 0);\n        if (parts.length == 2) {\n          r.end = convertToInt(parts[1], Integer.MAX_VALUE);\n        } else {\n          r.end = r.start;\n        }\n        if (r.start > r.end) {\n          throw new IllegalArgumentException(\"IntegerRange from \" + r.start + \n                                             \" to \" + r.end + \" is invalid\");\n        }\n        ranges.add(r);\n      }\n    }\n\n    /**","sourceCodeStart":2167,"sourceCodeEnd":2203,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/conf/Configuration.java#L2167-L2203","documentation":"Error \"integer range badly formed: {}\" thrown in apache/hadoop.","triggerScenarios":"Raised at runtime when the documented precondition or configuration requirement for this operation is violated.","commonSituations":"Misconfigured or missing property, invalid user input, or calling the API before its prerequisites are met.","solutions":["Format the integer range as comma-separated numbers or a-b ranges, e.g. '1,3,5-8'."],"exampleFix":"Set the property to '1024,2048-4096'.","handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"2add9630210752f88ceb1bb74eb65e37bf41da8e","analyzedAt":"2026-08-22T19:55:07.957Z","schemaVersion":2},"datasetVersion":"2026-08-22T20:17:22.307Z"}