From 1dde17efea302606bcb9159bf8a928bff1971e8a Mon Sep 17 00:00:00 2001 From: Sam Harwell Date: Thu, 20 Mar 2014 07:19:01 -0500 Subject: [PATCH] Mark Recognizer.getTokenErrorDisplay as deprecated (fixes #480) --- runtime/Java/src/org/antlr/v4/runtime/Recognizer.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/runtime/Java/src/org/antlr/v4/runtime/Recognizer.java b/runtime/Java/src/org/antlr/v4/runtime/Recognizer.java index f4531e85b..aff62e4ce 100644 --- a/runtime/Java/src/org/antlr/v4/runtime/Recognizer.java +++ b/runtime/Java/src/org/antlr/v4/runtime/Recognizer.java @@ -182,7 +182,13 @@ public abstract class Recognizer { * the token). This is better than forcing you to override a method in * your token objects because you don't have to go modify your lexer * so that it creates a new Java type. + * + * @deprecated This method is not called by the ANTLR 4 Runtime. Specific + * implementations of {@link ANTLRErrorStrategy} may provide a similar + * feature when necessary. For example, see + * {@link DefaultErrorStrategy#getTokenErrorDisplay}. */ + @Deprecated public String getTokenErrorDisplay(Token t) { if ( t==null ) return ""; String s = t.getText();