Skip to content

Commit

Permalink
Fix sonar code smell of missing else
Browse files Browse the repository at this point in the history
  • Loading branch information
julianladisch committed Feb 22, 2024
1 parent be100e9 commit 47b442c
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public static Future<Void> validate(String tenantId) {
return Future.succeededFuture();
}

String message = "11601";
String message;

if (tenantId.contains("_")) {
message = "11609";
Expand All @@ -46,6 +46,8 @@ public static Future<Void> validate(String tenantId) {
message = "11611";
} else if (STARTS_WITH_DIGIT.matcher(tenantId).matches()) {
message = "11612";
} else {
message = "11601";
}

return Future.failedFuture(new OkapiError(ErrorType.USER,
Expand Down

0 comments on commit 47b442c

Please sign in to comment.