Skip to content

Commit

Permalink
Fix exception for search flags (#8237)
Browse files Browse the repository at this point in the history
* Fix exception for search flags

Fixes #8230
Fixes #8234

* checkstyle
  • Loading branch information
Siedlerchr authored Nov 12, 2021
1 parent 80ab4ca commit 079a2d2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/main/java/org/jabref/preferences/SearchPreferences.java
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ public SearchPreferences(SearchDisplayMode searchDisplayMode, EnumSet<SearchFlag
}

public EnumSet<SearchFlags> getSearchFlags() {
// copy of returns an exception when the EnumSet is empty
if (searchFlags.isEmpty()) {
return EnumSet.noneOf(SearchFlags.class);
}
return EnumSet.copyOf(searchFlags);
}

Expand Down

0 comments on commit 079a2d2

Please sign in to comment.