{"record":{"id":"3d0dc06f858a5afb","repo":"quarkusio/quarkus","slug":"value-is-blank","errorCode":null,"errorMessage":"value is blank","messagePattern":"value is blank","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"independent-projects/bootstrap/app-model/src/main/java/io/quarkus/bootstrap/model/MutableBaseJvmOption.java","lineNumber":39,"sourceCode":"    public String getName() {\n        return name;\n    }\n\n    @Override\n    public Collection<String> getValues() {\n        return values;\n    }\n\n    protected void setName(String name) {\n        this.name = name;\n    }\n\n    public T addValue(String value) {\n        if (value == null) {\n            throw new IllegalArgumentException(\"value is null\");\n        }\n        if (value.isBlank()) {\n            throw new IllegalArgumentException(\"value is blank\");\n        }\n        if (values.isEmpty()) {\n            values = new HashSet<>(1);\n        }\n        for (String v : value.split(\"\\\\|\")) {\n            values.add(v);\n        }\n        return (T) this;\n    }\n\n    protected abstract String getPropertyGroupPrefix();\n\n    protected abstract String getQuarkusExtensionPropertyPrefix();\n\n    @Override\n    public void addToQuarkusExtensionProperties(Properties props) {\n        props.setProperty(getQuarkusExtensionPropertyPrefix() + name, toPropertyValue());\n    }","sourceCodeStart":21,"sourceCodeEnd":57,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/independent-projects/bootstrap/app-model/src/main/java/io/quarkus/bootstrap/model/MutableBaseJvmOption.java#L21-L57","documentation":"addValue(String) rejects blank (empty or whitespace-only) values with an IllegalArgumentException. A blank value cannot produce a valid JVM option and would silently render broken -X or -XX flags, so the library fails fast. Like the null check, this is a fail-fast guard for invalid builder input.","triggerScenarios":"Calling addValue(\"\") or addValue(\"   \") — typically when a configured property is empty or a value expression resolved to an empty string.","commonSituations":"quarkus.* JVM option config properties left empty (e.g. -Dquarkus.jvm.options.added.\"...\"=\"\"), env vars set to empty string, or string trimming/splitting that produced an empty token.","solutions":["Provide a non-blank value; trim or filter empty tokens before adding","Skip the addValue call when the source string is blank","Fix the configuration source so the property has an actual value"],"exampleFix":"// before\noption.addValue(cfg.get(\"add-opens\"));\n// after\nString v = cfg.get(\"add-opens\");\nif (v != null && !v.isBlank()) {\n    option.addValue(v);\n}","handlingStrategy":"validation","validationCode":"if (value != null && !value.isBlank()) {\n    option.addValue(value);\n}","typeGuard":"boolean isPresent(String s) { return s != null && !s.isBlank(); }","tryCatchPattern":"try {\n    option.addValue(value);\n} catch (IllegalArgumentException e) {\n    log.warnf(\"Skipping blank JVM option value: %s\", e.getMessage());\n}","preventionTips":["Trim and filter empty tokens before building options from split strings","Treat empty config properties as 'unset' rather than passing them through","Reject empty values at config-parse time"],"tags":["jvm-options","argument-validation","blank-value"],"backgroundTag":"blank-argument","analyzedSha":"e1c734241f34c7919086ceb4c9262b4a58f6de44","analyzedAt":"2026-09-05T17:01:29.979Z","contentChangedAt":"2026-09-05T17:01:29.979Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}