Skip to content

Commit

Permalink
Preventing npe from empty data or ingest type string (#38)
Browse files Browse the repository at this point in the history
  • Loading branch information
mineralntl authored Jun 26, 2024
1 parent 7760b83 commit ebca7ce
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/datawave/query/util/TypeMetadata.java
Original file line number Diff line number Diff line change
Expand Up @@ -401,14 +401,14 @@ private void fromString(String data) {
.stream()
.filter(e -> e.getValue().equals(Integer.valueOf(vs[0])))
.map(Entry::getKey)
.findFirst().get();
.findFirst().orElse("");

String dataType = ImmutableMap.copyOf(getDataTypesMiniMap())
.entrySet()
.stream()
.filter(e -> e.getValue().equals(Integer.valueOf(vs[1])))
.map(Entry::getKey)
.findFirst().get();
.findFirst().orElse("");
// @formatter:on

this.addTypeMetadata(entrySplits[0], ingestType, dataType);
Expand Down

0 comments on commit ebca7ce

Please sign in to comment.