Skip to content
This repository was archived by the owner on Oct 16, 2024. It is now read-only.
This repository was archived by the owner on Oct 16, 2024. It is now read-only.

Java 21 throws warning with idiomatic Freebuilder usage #466

Description

@rohlandm

Hello,

while preparing a codebase for the migration to Java 21, we noticed that when you use Freebuilder with default values as described in the README

public Builder() {
      // Set defaults in the builder constructor.
      description("Indescribable");
}

the Java 21 compiler now throws a warning, failing the compilation if the -Werror flag is set.

This can be suppressed with @SuppressWarnings("this-escape"), but having a cleaner solution would be preferable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions