Skip to content

Commit

Permalink
Null check nested object while processing single values nested reference
Browse files Browse the repository at this point in the history
  • Loading branch information
wwtamu committed Jan 2, 2025
1 parent 3627955 commit 02466e8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ public void validateBeforeSave(Data data) {
public void validateRequiredAttribute(Data data) {
// validate data before create or save
// validate extractor, transformer, and loader are all compatible
// validate fields descriptor name/reference key do not have conflicting fields
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,10 @@ private void processSimpleStructure(DataFieldDescriptor nestedDescriptor, SolrIn
private void processSingleValuedNestedReference(Map<String, Object> data, String parentId, DataFieldDescriptor nestedDescriptor, SolrInputDocument childDocument, int depth) {
Object nestedObject = data.remove(nestedDescriptor.getName());

if (nestedObject == null) {
return;
}

String[] nestedParts = NESTED_DELIMITER_PATTERN.split(nestedObject.toString());

if (nestedParts.length > depth) {
Expand Down

0 comments on commit 02466e8

Please sign in to comment.