Skip to content

Commit

Permalink
Fix DatasetMatcher NPE
Browse files Browse the repository at this point in the history
  • Loading branch information
mdoering committed Oct 12, 2020
1 parent 786b2ec commit 99963de
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions dao/src/main/java/life/catalogue/matching/DatasetMatcher.java
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,10 @@ public void accept(Name n) {
total++;
Integer oldId = n.getNameIndexId();
NameMatch m = ni.match(n, allowInserts, false);

if (!Objects.equals(oldId, m.getName().getKey())) {
nm.updateMatch(datasetKey, n.getId(), m.getName().getKey(), m.getType());

Integer newKey = m.hasMatch() ? m.getName().getKey() : null;
if (!Objects.equals(oldId, newKey)) {
nm.updateMatch(datasetKey, n.getId(), newKey, m.getType());
if (updateIssues) {
IssueContainer v = n.getVerbatimKey() != null ? vmGet.getIssues(key.id(n.getVerbatimKey())) : null;
if (v != null) {
Expand Down

0 comments on commit 99963de

Please sign in to comment.