Skip to content

Commit

Permalink
prevent NPE checking element definitions when no short definition pro…
Browse files Browse the repository at this point in the history
…vided
  • Loading branch information
Grahame Grieve committed Dec 11, 2023
1 parent 07275b0 commit 92ea69f
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -743,7 +743,7 @@ else if (parentInSummary) {
warning(errors, ValidationMessage.NO_RULE_DATE, IssueType.STRUCTURE, path, e.unbounded(), "The max cardinality of 'note' must be *");
}
String sd = e.getShortDefn();
if (sd.length() > 0) {
if (sd != null && sd.length() > 0) {
rule(errors, ValidationMessage.NO_RULE_DATE, IssueType.STRUCTURE, path, sd.contains("|") || Character.isUpperCase(sd.charAt(0)) || sd.startsWith("e.g. ") || !Character.isLetter(sd.charAt(0)) || Utilities.isURL(sd) || sd.startsWith("e.g. ") || startsWithType(sd), "Short Description must start with an uppercase character ('" + sd + "')");
rule(errors, ValidationMessage.NO_RULE_DATE, IssueType.STRUCTURE, path, !sd.endsWith(".") || sd.endsWith("etc."), "Short Description must not end with a period ('" + sd + "')");
rule(errors, ValidationMessage.NO_RULE_DATE, IssueType.STRUCTURE, path, e.getDefinition().contains("|") || Character.isUpperCase(e.getDefinition().charAt(0)) || !Character.isLetter(e.getDefinition().charAt(0)), "Long Description must start with an uppercase character ('" + e.getDefinition() + "')");
Expand Down

0 comments on commit 92ea69f

Please sign in to comment.