From ea60d26e4d5635ce67620d4938b865b3d809825d Mon Sep 17 00:00:00 2001 From: Tobias Diez Date: Fri, 20 Oct 2017 09:39:26 +0800 Subject: [PATCH] Fix NPE in MainTable (#3318) * Fix NPE in MainTable * Fix build --- src/main/java/org/jabref/gui/maintable/MainTable.java | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/main/java/org/jabref/gui/maintable/MainTable.java b/src/main/java/org/jabref/gui/maintable/MainTable.java index c1e04873209..9edd6805dba 100644 --- a/src/main/java/org/jabref/gui/maintable/MainTable.java +++ b/src/main/java/org/jabref/gui/maintable/MainTable.java @@ -537,12 +537,7 @@ public boolean isFileColumn(int modelIndex) { } private boolean matches(int row, Matcher m) { - Optional 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) {