{"record":{"id":"44941ce399dd0206","repo":"apache/druid","slug":"must-be-positive","errorCode":null,"errorMessage":" must be positive","messagePattern":" must be positive","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"extensions-contrib/consul-extensions/src/main/java/org/apache/druid/consul/discovery/ConsulDiscoveryConfig.java","lineNumber":269,"sourceCode":"          DEFAULT_MAX_CONNECTIONS_PER_ROUTE,\n          \"maxConnectionsPerRoute\"\n      );\n    }\n\n    private static int validatePort(Integer port)\n    {\n      int portValue = port == null ? 8500 : port;\n      if (portValue < 1 || portValue > 65535) {\n        throw new IllegalArgumentException(\"port must be between 1 and 65535\");\n      }\n      return portValue;\n    }\n\n    private static int validateConnectionPoolSize(Integer value, int defaultValue, String name)\n    {\n      int result = value == null ? defaultValue : value;\n      if (result <= 0) {\n        throw new IAE(name + \" must be positive\");\n      }\n      return result;\n    }\n\n    @JsonProperty\n    public String getHost()\n    {\n      return host;\n    }\n\n    @JsonProperty\n    public int getPort()\n    {\n      return port;\n    }\n\n    @JsonProperty\n    public Duration getConnectTimeout()","sourceCodeStart":251,"sourceCodeEnd":287,"githubUrl":"https://github.com/apache/druid/blob/9b90983fd291f26935af934383ce360473179e4d/extensions-contrib/consul-extensions/src/main/java/org/apache/druid/consul/discovery/ConsulDiscoveryConfig.java#L251-L287","documentation":"Generic validation helper for connection-pool settings: maxTotalConnections / maxConnectionsPerRoute must be > 0; a zero or negative configured value is rejected with the message naming the offending property.","triggerScenarios":"Thrown at extensions-contrib/consul-extensions/src/main/java/org/apache/druid/consul/discovery/ConsulDiscoveryConfig.java:269 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set the named pool-size property to a positive integer.","Remove the property to fall back to its default value."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"9b90983fd291f26935af934383ce360473179e4d","analyzedAt":"2026-09-07T13:32:30.957Z","contentChangedAt":"2026-09-07T13:32:30.957Z","schemaVersion":2},"datasetVersion":"2026-09-17T15:17:12.973Z"}