{"record":{"id":"cb3313c940dce55c","repo":"alibaba/nacos","slug":"startinclusive-must-be-less-than-or-equal-to-the-e","errorCode":null,"errorMessage":"startInclusive must be less than or equal to the endExclusive.","messagePattern":"startInclusive must be less than or equal to the endExclusive\\.","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"common/src/main/java/com/alibaba/nacos/common/utils/RandomUtils.java","lineNumber":78,"sourceCode":"     */\n    public static int nextInt(final int startInclusive, final int endExclusive) {\n        checkParameters(startInclusive, endExclusive);\n        int diff = endExclusive - startInclusive;\n        if (diff == 0) {\n            return startInclusive;\n        }\n        return startInclusive + RANDOM.nextInt(diff);\n    }\n    \n    /**\n     * Check input parameters.\n     *\n     * @param startInclusive lower limit, must be non-negative\n     * @param endExclusive   the upper bound (not included)\n     */\n    private static void checkParameters(final long startInclusive, final long endExclusive) {\n        if (endExclusive < startInclusive) {\n            throw new IllegalArgumentException(\n                \"startInclusive must be less than or equal to the endExclusive.\");\n        }\n        if (startInclusive < 0) {\n            throw new IllegalArgumentException(\"Both parameters must be non-negative\");\n        }\n    }\n}\n","sourceCodeStart":60,"sourceCodeEnd":86,"githubUrl":"https://github.com/alibaba/nacos/blob/9b989acdf181d00898f2e8839257bb2b2a3cefe3/common/src/main/java/com/alibaba/nacos/common/utils/RandomUtils.java#L60-L86","documentation":"Error \"startInclusive must be less than or equal to the endExclusive.\" thrown in alibaba/nacos.","triggerScenarios":"Thrown at common/src/main/java/com/alibaba/nacos/common/utils/RandomUtils.java:78 when the library encounters an invalid state.","commonSituations":"Requesting a random value with startInclusive greater than endExclusive.","solutions":["Correct the invalid value for RandomUtils range to match the expected format or allowed set, then retry."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"9b989acdf181d00898f2e8839257bb2b2a3cefe3","analyzedAt":"2026-08-14T07:17:31.569Z","schemaVersion":2},"datasetVersion":"2026-08-14T10:17:34.591Z"}