diff --git a/test/langtools/tools/javac/diags/examples/StringTemplate.java b/test/langtools/tools/javac/diags/examples/StringTemplate.java index 4f6c0f89192..e35cbab11e4 100644 --- a/test/langtools/tools/javac/diags/examples/StringTemplate.java +++ b/test/langtools/tools/javac/diags/examples/StringTemplate.java @@ -23,7 +23,7 @@ // key: compiler.misc.feature.string.templates // key: compiler.warn.preview.feature.use.plural - // options: --enable-preview -source 21 -Xlint:preview + // options: --enable-preview -source ${jdk.version} -Xlint:preview class StringTemplate { String m() { diff --git a/test/langtools/tools/javac/diags/examples/StringTemplateNoProcessor.java b/test/langtools/tools/javac/diags/examples/StringTemplateNoProcessor.java index 87df7de0164..f909ec726d2 100644 --- a/test/langtools/tools/javac/diags/examples/StringTemplateNoProcessor.java +++ b/test/langtools/tools/javac/diags/examples/StringTemplateNoProcessor.java @@ -24,7 +24,7 @@ // key: compiler.err.processor.missing.from.string.template.expression // key: compiler.misc.feature.string.templates // key: compiler.warn.preview.feature.use.plural - // options: --enable-preview -source 21 -Xlint:preview + // options: --enable-preview -source ${jdk.version} -Xlint:preview class StringTemplateNoProcessor { String m() { diff --git a/test/langtools/tools/javac/diags/examples/StringTemplateNotProcessor.java b/test/langtools/tools/javac/diags/examples/StringTemplateNotProcessor.java index 1e9472c87f9..8f7a75409ff 100644 --- a/test/langtools/tools/javac/diags/examples/StringTemplateNotProcessor.java +++ b/test/langtools/tools/javac/diags/examples/StringTemplateNotProcessor.java @@ -24,7 +24,7 @@ // key: compiler.note.preview.filename // key: compiler.note.preview.recompile // key: compiler.err.not.a.processor.type - // options: --enable-preview -source 21 + // options: --enable-preview -source ${jdk.version} import java.lang.*; diff --git a/test/langtools/tools/javac/diags/examples/StringTemplateRawProcessor.java b/test/langtools/tools/javac/diags/examples/StringTemplateRawProcessor.java index 1d1cb41acd3..c6205fbb4f2 100644 --- a/test/langtools/tools/javac/diags/examples/StringTemplateRawProcessor.java +++ b/test/langtools/tools/javac/diags/examples/StringTemplateRawProcessor.java @@ -26,7 +26,7 @@ // key: compiler.misc.unexpected.ret.val // key: compiler.err.prob.found.req // key: compiler.err.processor.type.cannot.be.a.raw.type - // options: --enable-preview -source 21 + // options: --enable-preview -source ${jdk.version} import java.lang.*; import java.lang.StringTemplate.Processor; diff --git a/test/langtools/tools/javac/diags/examples/StringTemplateUnclosedString.java b/test/langtools/tools/javac/diags/examples/StringTemplateUnclosedString.java index 008d0dc311e..c96ccf96ee3 100644 --- a/test/langtools/tools/javac/diags/examples/StringTemplateUnclosedString.java +++ b/test/langtools/tools/javac/diags/examples/StringTemplateUnclosedString.java @@ -25,7 +25,7 @@ // key: compiler.note.preview.recompile // key: compiler.err.unclosed.str.lit // key: compiler.err.string.template.is.not.well.formed - // options: --enable-preview -source 21 + // options: --enable-preview -source ${jdk.version} import java.lang.*; diff --git a/test/langtools/tools/javac/diags/examples/StringTemplateUnclosedTextBlock.java b/test/langtools/tools/javac/diags/examples/StringTemplateUnclosedTextBlock.java index 9c0f9c495ea..87460aba029 100644 --- a/test/langtools/tools/javac/diags/examples/StringTemplateUnclosedTextBlock.java +++ b/test/langtools/tools/javac/diags/examples/StringTemplateUnclosedTextBlock.java @@ -26,7 +26,7 @@ // key: compiler.err.unclosed.text.block // key: compiler.err.text.block.template.is.not.well.formed // key: compiler.err.premature.eof - // options: --enable-preview -source 21 + // options: --enable-preview -source ${jdk.version} import java.lang.*;