From d44365f93e82209f3953b8913cb4fd53d61b9b67 Mon Sep 17 00:00:00 2001 From: Snjezana Peco Date: Tue, 26 Mar 2024 16:14:05 +0100 Subject: [PATCH] Update Java 22 tests --- .../eclipse/java22/src/main/java/foo/bar/Foo.java | 8 +++++--- .../correction/ModifierCorrectionsQuickFixTest.java | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/org.eclipse.jdt.ls.tests/projects/eclipse/java22/src/main/java/foo/bar/Foo.java b/org.eclipse.jdt.ls.tests/projects/eclipse/java22/src/main/java/foo/bar/Foo.java index 78e1dfd0e3..33940688a9 100644 --- a/org.eclipse.jdt.ls.tests/projects/eclipse/java22/src/main/java/foo/bar/Foo.java +++ b/org.eclipse.jdt.ls.tests/projects/eclipse/java22/src/main/java/foo/bar/Foo.java @@ -3,7 +3,9 @@ /** * It's a Foo class */ -public sealed interface Foo -permits Bar { +public class Foo { + public Foo() { + System.out.println(); + super(); + } } -record Bar(String name) implements Foo { } diff --git a/org.eclipse.jdt.ls.tests/src/org/eclipse/jdt/ls/core/internal/correction/ModifierCorrectionsQuickFixTest.java b/org.eclipse.jdt.ls.tests/src/org/eclipse/jdt/ls/core/internal/correction/ModifierCorrectionsQuickFixTest.java index cdbc15a37c..9e1cb7ef18 100644 --- a/org.eclipse.jdt.ls.tests/src/org/eclipse/jdt/ls/core/internal/correction/ModifierCorrectionsQuickFixTest.java +++ b/org.eclipse.jdt.ls.tests/src/org/eclipse/jdt/ls/core/internal/correction/ModifierCorrectionsQuickFixTest.java @@ -1205,7 +1205,7 @@ public void testClassExtendFinalClass() throws Exception { public void testAddSealedMissingClassModifierProposal() throws Exception { Map options22 = new HashMap<>(); JavaModelUtil.setComplianceOptions(options22, JavaCore.VERSION_22); - options22.put(JavaCore.COMPILER_PB_ENABLE_PREVIEW_FEATURES, JavaCore.ENABLED); + options22.put(JavaCore.COMPILER_PB_ENABLE_PREVIEW_FEATURES, JavaCore.IGNORE); options22.put(JavaCore.COMPILER_PB_REPORT_PREVIEW_FEATURES, JavaCore.IGNORE); fJProject.setOptions(options22); IPackageFragment pack1 = fSourceFolder.createPackageFragment("test", false, null);