Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ADBDEV-5139: Convert profile to lower case #83

Merged
merged 1 commit into from
Mar 15, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -50,16 +50,18 @@ public ProfileReloadServiceImpl(ReadService readService,

@Override
public void reloadProfile(ProfileReloadRequestDto reloadRequestDto) {
String profile = reloadRequestDto.getProfile();
String profile = reloadRequestDto.getProfile() == null ? null : reloadRequestDto.getProfile().toLowerCase();
String server = reloadRequestDto.getServer();
log.info("Received a request to reload a profile with the parameters: profile={}, server={}", profile, server);
if (StringUtils.isBlank(server)) {
reloadAll(profile);
} else if (StringUtils.isNotBlank(profile)) {
reload(profile, server);
} else {
throw new IllegalArgumentException(String.format("The provided parameters (profile=%s, server=%s) " +
String message = String.format(String.format("The provided parameters (profile=%s, server=%s) " +
"are not correct. Please add profile", profile, server));
log.error(message);
throw new IllegalArgumentException(message);
}
}

Expand Down