Skip to content

Commit

Permalink
account for null reference names in validation
Browse files Browse the repository at this point in the history
  • Loading branch information
mrahanjam committed Oct 6, 2022
1 parent fa251ed commit d32626e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,9 @@ public void validate(FailureCollector collector) {
}

public void validate(FailureCollector collector, Map<String, String> arguments) {
IdUtils.validateReferenceName(referenceName, collector);
if (!Strings.isNullOrEmpty(referenceName)) {
IdUtils.validateReferenceName(referenceName, collector);
}
if (suffix != null && !containsMacro(NAME_SUFFIX)) {
try {
new SimpleDateFormat(suffix);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,9 @@ public void validate() {
}

public void validate(FailureCollector collector) {
IdUtils.validateReferenceName(referenceName, collector);
if (!Strings.isNullOrEmpty(referenceName)) {
IdUtils.validateReferenceName(referenceName, collector);
}
try {
getSchema();
} catch (IllegalArgumentException e) {
Expand Down

0 comments on commit d32626e

Please sign in to comment.