Skip to content

Commit

Permalink
2
Browse files Browse the repository at this point in the history
  • Loading branch information
Luke Sikina committed Sep 20, 2024
1 parent 82c87c7 commit b0ec219
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.function.Predicate;
import java.util.stream.Stream;

@Service
Expand Down Expand Up @@ -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<String> 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);
Expand Down

0 comments on commit b0ec219

Please sign in to comment.