Skip to content

Commit

Permalink
[407] throwing new exception is null or empty name
Browse files Browse the repository at this point in the history
  • Loading branch information
ganning127 committed Jul 20, 2023
1 parent 60a8969 commit 3e4cdd6
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ public static String getApplicationName() {
}

public static void setApplicationName(String name) {
if (name == null) {
name = DEFAULT_APPLICATION_NAME;
if (name == null || name.trim().isEmpty()) { // name can't contain only spaces
throw new IllegalArgumentException("null or empty name");
}

option = name;
Expand Down

0 comments on commit 3e4cdd6

Please sign in to comment.