Filter (@Nullable Date date, boolean before) { return date == null ? null : changeList -> { Date commitDate = changeList.getCommitDate(); return commitDate != null && (before ? commitDate.before(date) : commitDate.after(date)); }; }