quarkusio/quarkus · error · IllegalArgumentException

value is blank

Error message

value is blank

What it means

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.

Source

Thrown at independent-projects/bootstrap/app-model/src/main/java/io/quarkus/bootstrap/model/MutableBaseJvmOption.java:39

    public String getName() {
        return name;
    }

    @Override
    public Collection<String> getValues() {
        return values;
    }

    protected void setName(String name) {
        this.name = name;
    }

    public T addValue(String value) {
        if (value == null) {
            throw new IllegalArgumentException("value is null");
        }
        if (value.isBlank()) {
            throw new IllegalArgumentException("value is blank");
        }
        if (values.isEmpty()) {
            values = new HashSet<>(1);
        }
        for (String v : value.split("\\|")) {
            values.add(v);
        }
        return (T) this;
    }

    protected abstract String getPropertyGroupPrefix();

    protected abstract String getQuarkusExtensionPropertyPrefix();

    @Override
    public void addToQuarkusExtensionProperties(Properties props) {
        props.setProperty(getQuarkusExtensionPropertyPrefix() + name, toPropertyValue());
    }

View on GitHub (pinned to e1c734241f)

Solutions

  1. Provide a non-blank value; trim or filter empty tokens before adding
  2. Skip the addValue call when the source string is blank
  3. Fix the configuration source so the property has an actual value

Example fix

// before
option.addValue(cfg.get("add-opens"));
// after
String v = cfg.get("add-opens");
if (v != null && !v.isBlank()) {
    option.addValue(v);
}
Defensive patterns

Strategy: validation

Validate before calling

if (value != null && !value.isBlank()) {
    option.addValue(value);
}

Type guard

boolean isPresent(String s) { return s != null && !s.isBlank(); }

Try / catch

try {
    option.addValue(value);
} catch (IllegalArgumentException e) {
    log.warnf("Skipping blank JVM option value: %s", e.getMessage());
}

Prevention

When it happens

Trigger: Calling addValue("") or addValue(" ") — typically when a configured property is empty or a value expression resolved to an empty string.

Common situations: 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.

Related errors


AI-assisted analysis of quarkusio/quarkus@e1c734241f (2026-09-05). Data as JSON: /api/errors/3d0dc06f858a5afb. Report an issue: GitHub.