From a293bdff91f7bcc0deece6bed3151a40fad42a64 Mon Sep 17 00:00:00 2001 From: Joe Darcy Date: Mon, 15 Apr 2024 15:11:53 +0000 Subject: [PATCH] 8330197: Make javac/diags/example release agnostic Reviewed-by: jlahoda --- .../tools/javac/diags/examples/DefaultAndBothBoolean.java | 2 +- .../diags/examples/UnconditionalPatternAndBothBoolean.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/langtools/tools/javac/diags/examples/DefaultAndBothBoolean.java b/test/langtools/tools/javac/diags/examples/DefaultAndBothBoolean.java index dac10c13954..a3f602630a1 100644 --- a/test/langtools/tools/javac/diags/examples/DefaultAndBothBoolean.java +++ b/test/langtools/tools/javac/diags/examples/DefaultAndBothBoolean.java @@ -24,7 +24,7 @@ // key: compiler.err.default.and.both.boolean.values // key: compiler.note.preview.filename // key: compiler.note.preview.recompile -// options: --enable-preview --source 23 +// options: --enable-preview --source ${jdk.version} public class DefaultAndBothBoolean { private int test(boolean sel) { return switch (sel) { diff --git a/test/langtools/tools/javac/diags/examples/UnconditionalPatternAndBothBoolean.java b/test/langtools/tools/javac/diags/examples/UnconditionalPatternAndBothBoolean.java index 69d60d10f59..23b1bb82654 100644 --- a/test/langtools/tools/javac/diags/examples/UnconditionalPatternAndBothBoolean.java +++ b/test/langtools/tools/javac/diags/examples/UnconditionalPatternAndBothBoolean.java @@ -24,7 +24,7 @@ // key: compiler.err.unconditional.pattern.and.both.boolean.values // key: compiler.note.preview.filename // key: compiler.note.preview.recompile -// options: --enable-preview --source 23 +// options: --enable-preview --source ${jdk.version} public class UnconditionalPatternAndBothBoolean { private int test(boolean sel) { return switch (sel) {