diff --git a/pmd-core/src/main/java/net/sourceforge/pmd/lang/ast/impl/antlr4/AntlrToken.java b/pmd-core/src/main/java/net/sourceforge/pmd/lang/ast/impl/antlr4/AntlrToken.java index a4b627b7cd..22a4fcbdc3 100644 --- a/pmd-core/src/main/java/net/sourceforge/pmd/lang/ast/impl/antlr4/AntlrToken.java +++ b/pmd-core/src/main/java/net/sourceforge/pmd/lang/ast/impl/antlr4/AntlrToken.java @@ -49,13 +49,7 @@ public class AntlrToken implements GenericToken { */ @Deprecated public AntlrToken(final Token token, final AntlrToken previousComment, TextDocument textDoc) { - this.previousComment = previousComment; - this.textDoc = textDoc; - this.image = token.getText(); - this.startOffset = token.getStartIndex(); - this.endOffset = token.getStopIndex() + 1; // exclusive - this.channel = token.getChannel(); - this.kind = token.getType(); + this(token, previousComment, textDoc, new AntlrLexerBehavior()); } @Override