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

fix sonar finding: duplicate string literals #2531

Merged
merged 1 commit into from
Oct 10, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -85,17 +85,18 @@ public class MultitenantJdbcClientDetailsService extends MultitenantClientServic
"insert into oauth_client_details (" + CLIENT_FIELDS
+ ", client_id, identity_zone_id, created_by) values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)";

private static final String BASE_UPDATE_STATEMENT =
"update oauth_client_details set ";

private static final String DEFAULT_UPDATE_STATEMENT =
"update oauth_client_details " + "set "
+ CLIENT_FIELDS_FOR_UPDATE.replaceAll(", ", "=?, ") + "=? where client_id = ? and identity_zone_id = ?";
BASE_UPDATE_STATEMENT + CLIENT_FIELDS_FOR_UPDATE.replaceAll(", ", "=?, ")
+ "=? where client_id = ? and identity_zone_id = ?";

private static final String DEFAULT_UPDATE_SECRET_STATEMENT =
"update oauth_client_details "
+ "set client_secret = ? where client_id = ? and identity_zone_id = ?";
BASE_UPDATE_STATEMENT + "client_secret = ? where client_id = ? and identity_zone_id = ?";

private static final String DEFAULT_UPDATE_CLIENT_JWT_CONFIG_STATEMENT =
"update oauth_client_details "
+ "set client_jwt_config = ? where client_id = ? and identity_zone_id = ?";
BASE_UPDATE_STATEMENT + "client_jwt_config = ? where client_id = ? and identity_zone_id = ?";

static final String DEFAULT_DELETE_STATEMENT =
"delete from oauth_client_details where client_id = ? and identity_zone_id = ?";
Expand Down