{"record":{"id":"262b5caf9f30edcd","repo":"apache/hadoop","slug":"invalid-argument-please-specify-either-true-o","errorCode":null,"errorMessage":"Invalid argument: {}. Please specify either true or false.","messagePattern":"Invalid argument: (.+?)\\. Please specify either true or false\\.","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/tools/federation/RouterAdmin.java","lineNumber":837,"sourceCode":"    if (!updated) {\n      System.err.println(\"Cannot update mount point \" + mount);\n    }\n    return updated;\n  }\n\n  /**\n   * Parse string to boolean.\n   * @param value the string to be parsed.\n   * @return parsed boolean value.\n   * @throws Exception if other than true|false is provided.\n   */\n  private boolean getBooleanValue(String value) throws Exception {\n    if (value.equalsIgnoreCase(\"true\")) {\n      return true;\n    } else if (value.equalsIgnoreCase(\"false\")) {\n      return false;\n    }\n    throw new IllegalArgumentException(\"Invalid argument: \" + value\n        + \". Please specify either true or false.\");\n  }\n\n  /**\n   * Gets the mount table entry.\n   * @param mount name of the mount entry.\n   * @param mountTable the mount table.\n   * @return corresponding mount entry.\n   * @throws IOException in case of failure to retrieve mount entry.\n   */\n  private MountTable getMountEntry(String mount, MountTableManager mountTable)\n      throws IOException {\n    GetMountTableEntriesRequest getRequest =\n        GetMountTableEntriesRequest.newInstance(mount);\n    GetMountTableEntriesResponse getResponse =\n        mountTable.getMountTableEntries(getRequest);\n    List<MountTable> results = getResponse.getEntries();\n    MountTable existingEntry = null;","sourceCodeStart":819,"sourceCodeEnd":855,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/tools/federation/RouterAdmin.java#L819-L855","documentation":"Error \"Invalid argument: {}. Please specify either true or false.\" thrown in apache/hadoop.","triggerScenarios":"RouterAdmin boolean argument parsing received a value other than true/false.","commonSituations":"User passed yes/no, 1/0, or an empty value for a readonly/readonly-style boolean flag.","solutions":["Pass exactly 'true' or 'false' for this boolean argument.","Check the option's expected value type in -help output."],"exampleFix":null,"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"}