{"record":{"id":"1048879ca10a424a","repo":"apache/cassandra","slug":"invalid-s-blocking-only-accepts-true-or-fal","errorCode":null,"errorMessage":"Invalid [%s]. Blocking only accepts 'true' or 'false'.","messagePattern":"Invalid \\[(.+?)\\]\\. Blocking only accepts 'true' or 'false'\\.","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"src/java/org/apache/cassandra/tools/nodetool/EnableAuditLog.java","lineNumber":80,"sourceCode":"    private long maxLogSize = Long.MIN_VALUE;\n\n    @Option(paramLabel = \"archive_command\", names = { \"--archive-command\" }, description = \"Command that will handle archiving rolled audit log files.\" +\n                                                                                   \" Format is \\\"/path/to/script.sh %%path\\\" where %%path will be replaced with the file to archive\" +\n                                                                                   \" Enable this by setting the audit_logging_options.allow_nodetool_archive_command: true in the config.\")\n\n    private String archiveCommand = null;\n\n    @Option(paramLabel = \"archive_retries\", names = { \"--max-archive-retries\" }, description = \"Max number of archive retries.\")\n    private int archiveRetries = Integer.MIN_VALUE;\n\n    @Override\n    public void execute(NodeProbe probe)\n    {\n        Boolean bblocking = null;\n        if (blocking != null)\n        {\n            if (!blocking.equalsIgnoreCase(\"TRUE\") && !blocking.equalsIgnoreCase(\"FALSE\"))\n                throw new IllegalArgumentException(\"Invalid [\" + blocking + \"]. Blocking only accepts 'true' or 'false'.\");\n            else\n                bblocking = Boolean.parseBoolean(blocking);\n        }\n        probe.enableAuditLog(logger, Collections.EMPTY_MAP, included_keyspaces, excluded_keyspaces, included_categories, excluded_categories, included_users, excluded_users,\n                             archiveRetries, bblocking, rollCycle, maxLogSize, maxQueueWeight, archiveCommand);\n    }\n}\n","sourceCodeStart":62,"sourceCodeEnd":88,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/tools/nodetool/EnableAuditLog.java#L62-L88","documentation":"IllegalArgumentException from EnableAuditLog.execute when the --blocking option is not the literal string 'true' or 'false'. Nodetool options arrive as strings, so the boolean is parsed manually and any other value is rejected before applying audit log settings.","triggerScenarios":"Thrown at src/java/org/apache/cassandra/tools/nodetool/EnableAuditLog.java:80 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass --blocking true or --blocking false exactly (lowercase)","Omit the flag to keep the current setting","Fix scripts that pass yes/no or 1/0"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1","analyzedAt":"2026-09-10T07:29:22.284Z","contentChangedAt":"2026-09-10T07:29:22.284Z","schemaVersion":2},"datasetVersion":"2026-09-17T15:17:12.973Z"}