Skip to content

Commit

Permalink
Replace usage of deprecated ANTLRInputStream class
Browse files Browse the repository at this point in the history
  • Loading branch information
findepi committed Mar 15, 2022
1 parent 4e62072 commit 95cabd6
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

import io.trino.spi.StandardErrorCode;
import io.trino.spi.TrinoException;
import org.antlr.v4.runtime.ANTLRInputStream;
import org.antlr.v4.runtime.CharStreams;
import org.antlr.v4.runtime.Token;
import org.joda.time.format.DateTimeFormatter;
import org.joda.time.format.DateTimeFormatterBuilder;
Expand Down Expand Up @@ -79,7 +79,7 @@ public static DateTimeFormatter createDateTimeFormatter(String format)

public static List<? extends Token> tokenize(String format)
{
DateFormat lexer = new DateFormat(new ANTLRInputStream(format));
DateFormat lexer = new DateFormat(CharStreams.fromString(format));
return lexer.getAllTokens();
}
}

0 comments on commit 95cabd6

Please sign in to comment.