Fixes a bug in the getMatching method causing the input list to lose all matching elements
All checks were successful
KnarCraft/FFmpegConvert/pipeline/head This commit looks good
All checks were successful
KnarCraft/FFmpegConvert/pipeline/head This commit looks good
This commit is contained in:
@ -40,6 +40,7 @@ public final class ListUtil {
|
||||
* @return <p>A new list containing all matching elements.</p>
|
||||
*/
|
||||
static <T> List<T> getMatching(List<T> list, Predicate<T> predicate) {
|
||||
list = new ArrayList<>(list);
|
||||
List<T> copy = new ArrayList<>(list);
|
||||
list.removeIf(predicate);
|
||||
copy.removeAll(list);
|
||||
|
Reference in New Issue
Block a user