eclipse-vertx/vert.x · error · NullPointerException

No null value accepted

Error message

No null value accepted

What it means

Null guard in HttpSettings.set: the typed setting value being written into the HTTP settings object is null. Settings carry concrete values, so nulls are rejected with this generic NullPointerException sentinel; the input at fault is the value passed for the given HttpSetting key.

Source

Thrown at vertx-core/src/main/java/io/vertx/core/http/HttpSettings.java:53

  }

  public abstract HttpSettings copy();

  /**
   * @return the HTTP version defining the settings (which defines the implicit schema).
   */
  abstract HttpVersion version();

  /**
   * Set the {@code setting } value with {@code <T>}.
   *
   * @param setting the setting
   * @param value the java value
   * @return a reference to this, so the API can be used fluently
   */
  public <T> HttpSettings set(HttpSetting<T> setting, T value) {
    if (value == null) {
      throw new NullPointerException("No null value accepted");
    }
    return setLong(setting, setting.to.convert(value));
  }

  /**
   * Get the {@code setting } value as {@code <T>}.
   *
   * @param setting the setting
   * @return the value or {@code null} if the value is not present
   */
  public <T> T get(HttpSetting<T> setting) {
    HttpVersion version = version();
    if (!setting.versions.contains(version)) {
      throw new IllegalArgumentException("Invalid setting");
    }
    Long value = getLong(setting);
    return value != null ? setting.from.convert(value) : null;
  }

View on GitHub (pinned to fb308bd8c3)

Solutions

  1. Pass a non-null value for the setting
  2. Remove the setting instead of setting it to null if the intent is to clear it
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at vertx-core/src/main/java/io/vertx/core/http/HttpSettings.java:53 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of eclipse-vertx/vert.x@fb308bd8c3 (2026-09-06). Data as JSON: /api/errors/476da049f33aa0c3. Report an issue: GitHub.