Skip to content

Commit

Permalink
Fixed potential NPE
Browse files Browse the repository at this point in the history
  • Loading branch information
depryf committed Jul 23, 2024
1 parent 3783881 commit f7c89cf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/com/imsweb/layout/hl7/Hl7Utils.java
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ public static Hl7Segment segmentFromString(Hl7Message msg, String line, Hl7Layou
String compChar = msg.getComponentSeparator();
String subCompChar = msg.getSubComponentSeparator();
String subCompValue = decodeEscapedSequences(subCompValues[subCompIdx], escapeChar, fieldChar, repeatingChar, compChar, subCompChar);
if (!subCompValue.isEmpty())
if (subCompValue != null && !subCompValue.isEmpty())
new Hl7SubComponent(component, subCompIdx + 1, subCompValue);
}
}
Expand Down

0 comments on commit f7c89cf

Please sign in to comment.