Skip to content

Commit

Permalink
Add default naive implementation of StreamService loadAllByTitle()
Browse files Browse the repository at this point in the history
  • Loading branch information
ryan-carroll-graylog committed Nov 14, 2023
1 parent 306797d commit c9db25e
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public interface StreamService extends PersistedService {
List<Stream> loadAllEnabled();

default List<Stream> loadAllByTitle(String title) {
throw new UnsupportedOperationException("loadAllByTitle method not implemented");
return loadAll().stream().filter(s -> title.equals(s.getTitle())).toList();
}

/**
Expand Down

0 comments on commit c9db25e

Please sign in to comment.