Skip to content

Commit

Permalink
Refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
andreisilviudragnea committed Mar 16, 2022
1 parent 07901f3 commit a475b8d
Showing 1 changed file with 3 additions and 3 deletions.
Expand Up @@ -126,15 +126,15 @@ public static Location getLastLocation(List<Invocation> invocations) {

public static Invocation findPreviousVerifiedInOrder(
List<Invocation> invocations, InOrderContext context) {
LinkedList<Invocation> verifiedOnly =
List<Invocation> verifiedOnly =
invocations.stream()
.filter(context::isVerified)
.collect(Collectors.toCollection(LinkedList::new));
.collect(Collectors.toList());

if (verifiedOnly.isEmpty()) {
return null;
} else {
return verifiedOnly.getLast();
return verifiedOnly.get(verifiedOnly.size() - 1);
}
}

Expand Down

0 comments on commit a475b8d

Please sign in to comment.