From 9bd489a921d6ce7695ff5aadc5aa518ee7ad7a5f Mon Sep 17 00:00:00 2001 From: Yichen Yan Date: Sat, 26 Aug 2023 08:04:59 +0800 Subject: [PATCH] fix: suppress `this-escape` warning introduced in JDK 21. Signed-off-by: Yichen Yan --- .../resources/org/antlr/v4/tool/templates/codegen/Java/Java.stg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tool/resources/org/antlr/v4/tool/templates/codegen/Java/Java.stg b/tool/resources/org/antlr/v4/tool/templates/codegen/Java/Java.stg index d1fa059064..3a97a1fa27 100644 --- a/tool/resources/org/antlr/v4/tool/templates/codegen/Java/Java.stg +++ b/tool/resources/org/antlr/v4/tool/templates/codegen/Java/Java.stg @@ -899,7 +899,7 @@ import org.antlr.v4.runtime.misc.*; >> Lexer(lexer, atn, actionFuncs, sempredFuncs, superClass) ::= << -@SuppressWarnings({"all", "warnings", "unchecked", "unused", "cast", "CheckReturnValue"}) +@SuppressWarnings({"all", "warnings", "unchecked", "unused", "cast", "CheckReturnValue", "this-escape"}) public class extends { static { RuntimeMetaData.checkVersion("", RuntimeMetaData.VERSION); }