Merge pull request #15419 from niket17590/feature/BAEL-7062-GetIndex

BAEL-7062 - Review Comment
This commit is contained in:
Loredana Crusoveanu 2023-12-14 17:24:10 +02:00 committed by GitHub
commit 9dcd9c9c20
1 changed files with 1 additions and 1 deletions

View File

@ -34,7 +34,7 @@ public class FirstMatchingElementUnitTest {
@Test
public void whenUsingIntStream_thenFindFirstMatchingUserIndex() {
int index = IntStream.range(0, userList.size() - 1)
int index = IntStream.range(0, userList.size())
.filter(streamIndex -> searchName.equals(userList.get(streamIndex).getUserName()))
.findFirst()
.orElse(-1);