Skip to content

Commit

Permalink
NPE fix
Browse files Browse the repository at this point in the history
  • Loading branch information
keithboone committed Nov 20, 2024
1 parent db6d80a commit 771d6d1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/main/java/gov/cdc/izgateway/utils/HL7Utils.java
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,9 @@ public static String maskSegments(String message) {
// Identify segment starts in text messages using the case sensitive pattern /[^a-zA-Z0-9][A-Z]{3}\|/
// (a non-alphanumeric character, followed by three uppercase alphabetic characters followed by a vertical bar |).
// identify segment ends at either \r or \n or next segment start.
if (message == null) {
return null;
}
Matcher m = HL7Utils.SEGMENT_STARTS.matcher(message);
StringBuffer b = new StringBuffer();
for (boolean result = m.find(); result; result = m.find()) {
Expand Down

0 comments on commit 771d6d1

Please sign in to comment.