Skip to content

Commit

Permalink
Fix #2996: ChangeEventHandler throws NPE at times (#2998)
Browse files Browse the repository at this point in the history
* Fix #2996: ChangeEventHandler throws NPE at times

* Address review comments
  • Loading branch information
vivekratnavel committed Feb 26, 2022
1 parent 412d61a commit 105f2dd
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import javax.ws.rs.container.ContainerResponseContext;
import javax.ws.rs.core.Response.Status;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.jdbi.v3.core.Jdbi;
import org.openmetadata.catalog.CatalogApplicationConfig;
import org.openmetadata.catalog.Entity;
Expand Down Expand Up @@ -207,7 +208,7 @@ private List<Thread> getThreads(List<FieldChange> fields, Object entity, CHANGE_
String fieldName = field.getName();
String arrayFieldName = null;
String arrayFieldValue = null;
String newFieldValue = field.getNewValue().toString();
String newFieldValue = field.getNewValue() != null ? field.getNewValue().toString() : StringUtils.EMPTY;
if (fieldName.contains(".")) {
String[] fieldNameParts = fieldName.split("\\.");
// For array type, it should have 3 ex: columns.comment.description
Expand Down

0 comments on commit 105f2dd

Please sign in to comment.