Skip to content

Commit

Permalink
Fix NPE in MainTable (JabRef#3318)
Browse files Browse the repository at this point in the history
* Fix NPE in MainTable

* Fix build
  • Loading branch information
tobiasdiez authored and halirutan committed Oct 20, 2017
1 parent 13ba10e commit ea60d26
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/main/java/org/jabref/gui/maintable/MainTable.java
Original file line number Diff line number Diff line change
Expand Up @@ -537,12 +537,7 @@ public boolean isFileColumn(int modelIndex) {
}

private boolean matches(int row, Matcher<BibEntry> m) {
Optional<BibEntry> bibEntry = getBibEntry(row);

if (bibEntry.isPresent()) {
return m.matches(bibEntry.get());
}
return m.matches(null);
return getBibEntry(row).map(m::matches).orElse(false);
}

private boolean isComplete(int row) {
Expand Down

0 comments on commit ea60d26

Please sign in to comment.