Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Luke Sikina committed Sep 20, 2024
1 parent 17890f6 commit 82c87c7
Showing 1 changed file with 3 additions and 2 deletions.
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.stream.Stream;

@Service
public class ConceptDecoratorService {
Expand All @@ -36,8 +37,8 @@ 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 = List.of(concept.conceptPath()
.split("\\\\")); // you have to double escape the slash. Once for strings, and once for regex
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

return switch (conceptNodes.size()) {
case COMPLIANT, NON_COMPLIANT_TABLED -> populateTabledConcept(concept, conceptNodes);
Expand Down

0 comments on commit 82c87c7

Please sign in to comment.