diff --git a/src/main/java/org/jabref/preferences/SearchPreferences.java b/src/main/java/org/jabref/preferences/SearchPreferences.java index ea902bfe13b..10273c0a892 100644 --- a/src/main/java/org/jabref/preferences/SearchPreferences.java +++ b/src/main/java/org/jabref/preferences/SearchPreferences.java @@ -45,6 +45,10 @@ public SearchPreferences(SearchDisplayMode searchDisplayMode, EnumSet getSearchFlags() { + // copy of returns an exception when the EnumSet is empty + if (searchFlags.isEmpty()) { + return EnumSet.noneOf(SearchFlags.class); + } return EnumSet.copyOf(searchFlags); }