Skip to content

Commit

Permalink
Use Stream.toList
Browse files Browse the repository at this point in the history
  • Loading branch information
akurtakov committed Oct 27, 2022
1 parent 5675823 commit cb5f472
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -117,12 +117,12 @@ private static IStateStack assertLineTokenization(final IGrammar grammar, final
token.getStartIndex(),
Math.min(token.getEndIndex(), line.length())), // TODO Math.min not required in upstream why?
token.getScopes()))
.collect(toList());
.toList();

// TODO@Alex: fix tests instead of working around
if (!line.isEmpty()) {
// Remove empty tokens...
testCase.tokens = testCase.tokens.stream().filter(token -> !token.getValue().isEmpty()).collect(toList());
testCase.tokens = testCase.tokens.stream().filter(token -> !token.getValue().isEmpty()).toList();
}

deepEqual(actualTokens, testCase.tokens, "Tokenizing line '" + line + "'");
Expand Down

0 comments on commit cb5f472

Please sign in to comment.