Mark BufferedTokenStream.reset as deprecated to avoid confusion

See #895
This commit is contained in:
Sam Harwell 2017-01-07 10:40:25 -06:00
parent bcde6f923a
commit 633a2df710
2 changed files with 9 additions and 1 deletions

View File

@ -89,6 +89,14 @@ public class BufferedTokenStream implements TokenStream {
// no resources to release
}
/**
* This method resets the token stream back to the first token in the
* buffer. It is equivalent to calling {@link #seek}{@code (0)}.
*
* @see #setTokenSource(TokenSource)
* @deprecated Use {@code seek(0)} instead.
*/
@Deprecated
public void reset() {
seek(0);
}

View File

@ -1288,7 +1288,7 @@ public class TestPerformance extends BaseJavaToolTest {
throw ex;
}
tokens.reset();
tokens.seek(0);
if (REUSE_PARSER && parser != null) {
parser.setInputStream(tokens);
} else {