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

Update SAMLSSOServiceProviderdAOImpl to use named parameters #5887

Conversation

Osara-B
Copy link
Contributor

@Osara-B Osara-B commented Aug 26, 2024

Proposed changes in this pull request

This PR introduces usage of named parameters in SAMLSSOServiceProviderDAOImpl.java. To support the transition from positional parameters to named parameters SAMLSSOServiceProvider.java is updated. This change improves code readability and maintainability.

-The refactored code replaces positional indices with named parameters.
-SQL queries are being executed using named parameters instead of positional indices.

Related to,

@Osara-B Osara-B force-pushed the feature-remove-registry-saml branch from 438a239 to 7a768ac Compare August 27, 2024 09:17
@@ -329,8 +329,8 @@ private boolean processIsServiceProviderExists(Connection connection, String iss

try (NamedPreparedStatement statement = new NamedPreparedStatement(connection,
SAMLSSOServiceProviderConstants.SqlQueries.GET_SAML2_SSO_CONFIG_ID_BY_ISSUER)) {
statement.setString(1, issuer);
statement.setString(2, tenantUUID);
statement.setString("ISSUER", issuer);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets use constants.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Osara-B Osara-B force-pushed the feature-remove-registry-saml branch 2 times, most recently from 827ebcb to afd4a6b Compare August 28, 2024 06:17
@@ -24,67 +24,138 @@ private SAMLSSOServiceProviderConstants() {

}

public static class SAML2TableColumns {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's have an empty line here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


}

//IDN_SAML2_SSO table
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a space after //

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Osara-B Osara-B force-pushed the feature-remove-registry-saml branch from afd4a6b to f02e487 Compare September 4, 2024 10:21
@UdeshAthukorala UdeshAthukorala merged commit faf5a42 into wso2:feature-remove-registry-saml Sep 5, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants