{"record":{"id":"7e902c51e9010941","repo":"apache/hadoop","slug":"integerrange-from-to-is-invalid","errorCode":null,"errorMessage":"IntegerRange from {} to {} is invalid","messagePattern":"IntegerRange from (.+?) to (.+?) is invalid","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/conf/Configuration.java","lineNumber":2196,"sourceCode":"    \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    /**\n     * Convert a string to an int treating empty strings as the default value.\n     * @param value the string value\n     * @param defaultValue the value for if the string is empty\n     * @return the desired integer\n     */\n    private static int convertToInt(String value, int defaultValue) {\n      String trim = value.trim();\n      if (trim.length() == 0) {\n        return defaultValue;\n      }\n      return Integer.parseInt(trim);","sourceCodeStart":2178,"sourceCodeEnd":2214,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/conf/Configuration.java#L2178-L2214","documentation":"Error \"IntegerRange from {} to {} is invalid\" 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":["Use an ascending range where the start is not greater than the end."],"exampleFix":"Change '10-5' to '5-10'.","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"}