Skip to content

False positive "Flexible Constructor Bodies is only available with source level 25" on @AllArgsConstructor with Java 21 #4543

Closed

Description

@felixhou-offer

Environment:

VS Code version: 1.x

Extension version: 1.57.0

Java version: OpenJDK 21

Project type: Spring Boot 3.5.3 (Maven)

Description:
When using Lombok's @AllArgsConstructor annotation on an entity/DTO class in a Java 21 project, the extension incorrectly flags a syntax error:
The Java feature 'Flexible Constructor Bodies' is only available with source level 25 and above Java(4195411)

Steps to reproduce:

Open a Spring Boot / Maven project with Java 21 compliance level (java.project.compiler.compliance: "21").

Create a class annotated with Lombok @AllArgsConstructor.

The editor shows a Java 25 syntax error on the class/constructor.

Workaround:
Downgrading the extension to 1.53.0 resolves the issue immediately.

Image

Activity

  1. github-actions commented on Oct 15, 2026

    @github-actions

    We have found issues that are potential duplicates:

    If any of the issues listed above are a duplicate, please consider closing this issue & upvoting/commenting the original one.
    Alternatively, if neither of the listed issues addresses your feature/bug, keep this issue open.

  2. datho7561 commented on Oct 15, 2026

    @datho7561
    Contributor

    This is a duplicate of the auto-linked issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions