diff --git a/src/main/java/edu/harvard/dbmi/avillach/dictionary/ConceptDecoratorService.java b/src/main/java/edu/harvard/dbmi/avillach/dictionary/ConceptDecoratorService.java index a67bc8f..23a637f 100644 --- a/src/main/java/edu/harvard/dbmi/avillach/dictionary/ConceptDecoratorService.java +++ b/src/main/java/edu/harvard/dbmi/avillach/dictionary/ConceptDecoratorService.java @@ -10,6 +10,7 @@ import org.springframework.stereotype.Service; import java.util.List; +import java.util.function.Predicate; import java.util.stream.Stream; @Service @@ -38,7 +39,7 @@ public Concept populateParentConcepts(Concept concept) { // In some environments, certain parent concepts have critical details that we need to add to the detailed response List conceptNodes = Stream.of(concept.conceptPath() - .split("\\\\")).filter(String::isBlank).toList(); // you have to double escape the slash. Once for strings, and once for regex + .split("\\\\")).filter(Predicate.not(String::isBlank)).toList(); // you have to double escape the slash. Once for strings, and once for regex return switch (conceptNodes.size()) { case COMPLIANT, NON_COMPLIANT_TABLED -> populateTabledConcept(concept, conceptNodes);