From cb5f4728cd3f0f1b2eaa4f2836519309ffacd20c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D0=BB=D0=B5=D0=BA=D1=81=D0=B0=D0=BD=D0=B4=D1=8A?= =?UTF-8?q?=D1=80=20=D0=9A=D1=83=D1=80=D1=82=D0=B0=D0=BA=D0=BE=D0=B2?= Date: Thu, 27 Oct 2022 09:24:44 +0300 Subject: [PATCH] Use Stream.toList --- .../org/eclipse/tm4e/core/grammar/internal/RawTestImpl.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/org.eclipse.tm4e.core.tests/src/main/java/org/eclipse/tm4e/core/grammar/internal/RawTestImpl.java b/org.eclipse.tm4e.core.tests/src/main/java/org/eclipse/tm4e/core/grammar/internal/RawTestImpl.java index 186443bd5..8f7073293 100644 --- a/org.eclipse.tm4e.core.tests/src/main/java/org/eclipse/tm4e/core/grammar/internal/RawTestImpl.java +++ b/org.eclipse.tm4e.core.tests/src/main/java/org/eclipse/tm4e/core/grammar/internal/RawTestImpl.java @@ -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 + "'");