Skip to content

Enabling preview features causes error checks to disappear #2994

@gmsdelmundo

Description

@gmsdelmundo

After enabling preview features in pom.xml, all error checks disappear in Java files.

Environment
  • Operating System: Windows_NT x64 10.0.19044
  • JDK version: JDK 17
  • Visual Studio Code version: 1.76.0
  • Java extension version: 1.15.0
Steps To Reproduce
  1. Follow the steps here: https://github.com/redhat-developer/vscode-java/wiki/Enabling-Java-preview-features
    • pom.xml
      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.11.0</version>
        <configuration>
          <source>17</source>
          <target>17</target>
          <compilerArgs>--enable-preview</compilerArgs>
        </configuration>
      </plugin>
  1. Type anything into a Java file that should cause errors.
    • Java Language Server Log File
!ENTRY org.eclipse.jdt.ls.core 1 0 2023-03-10 21:41:01.979
!MESSAGE >> workspace/didChangeWatchedFiles 

!ENTRY org.eclipse.jdt.ls.core 1 0 2023-03-10 21:41:02.663
!MESSAGE Reconciled 1. Took 0 ms

!ENTRY org.eclipse.jdt.ls.core 1 0 2023-03-10 21:41:02.710
!MESSAGE >> textDocument/inlayHint

!ENTRY org.eclipse.jdt.ls.core 1 0 2023-03-10 21:41:03.118
!MESSAGE begin problem for /SampleClass.java

!ENTRY org.eclipse.jdt.ls.core 1 0 2023-03-10 21:41:03.118
!MESSAGE 0 problems reported for /SampleClass.java

!ENTRY org.eclipse.jdt.ls.core 1 0 2023-03-10 21:41:03.118
!MESSAGE Validated 1. Took 5 ms
Current Result (with --enable-preview in pom.xml)

image

Expected Result (without --enable-preview in pom.xml)

image

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