Merge pull request #15419 from niket17590/feature/BAEL-7062-GetIndex
BAEL-7062 - Review Comment
This commit is contained in:
commit
9dcd9c9c20
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue