{"record":{"id":"8c7c6483cce73b4e","repo":"eclipse-vertx/vert.x","slug":"ndots-must-be-1","errorCode":null,"errorMessage":"ndots must be >= -1","messagePattern":"ndots must be >= -1","errorType":"exception","errorClass":"java.lang.IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"vertx-core/src/main/java/io/vertx/core/dns/AddressResolverOptions.java","lineNumber":492,"sourceCode":"  }\n\n  /**\n   * @return the ndots value\n   */\n  public int getNdots() {\n    return ndots;\n  }\n\n  /**\n   * Set the ndots value used when resolving using search domains, the default value is {@code -1} which\n   * determines the value from the OS on Linux or uses the value {@code 1}.\n   *\n   * @param ndots the new ndots value\n   * @return a reference to this, so the API can be used fluently\n   */\n  public AddressResolverOptions setNdots(int ndots) {\n    if (ndots < -1) {\n      throw new IllegalArgumentException(\"ndots must be >= -1\");\n    }\n    this.ndots = ndots;\n    return this;\n  }\n\n  /**\n   * @return the value {@code true} when the dns server selection uses round robin\n   */\n  public boolean isRotateServers() {\n    return rotateServers;\n  }\n\n  /**\n   * Set to {@code true} to enable round-robin selection of the dns server to use. It spreads the query load\n   * among the servers and avoids all lookup to hit the first server of the list.\n   *\n   * @return a reference to this, so the API can be used fluently\n   */","sourceCodeStart":474,"sourceCodeEnd":510,"githubUrl":"https://github.com/eclipse-vertx/vert.x/blob/fb308bd8c3f12c79f4ae89bef67fadf6c80d036e/vertx-core/src/main/java/io/vertx/core/dns/AddressResolverOptions.java#L474-L510","documentation":"Configuration validation in setNdots: the ndots threshold used when deciding whether a hostname is absolute relative to search domains must be -1 (auto-detect from the OS) or a non-negative count. Values below -1 have no defined semantics and are rejected.","triggerScenarios":"Thrown at vertx-core/src/main/java/io/vertx/core/dns/AddressResolverOptions.java:492 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass -1 to auto-detect, or a value >= 0","Validate external configuration input before applying it to AddressResolverOptions"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"fb308bd8c3f12c79f4ae89bef67fadf6c80d036e","analyzedAt":"2026-09-06T11:37:12.241Z","contentChangedAt":"2026-09-06T11:37:12.241Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}