Skip to content

Commit

Permalink
CB-5954. Fixed checkstyle
Browse files Browse the repository at this point in the history
  • Loading branch information
DenisSinelnikov committed Dec 24, 2024
1 parent 070913b commit 4dfd016
Showing 1 changed file with 17 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,11 @@ public Map<String, Object> authExternalUser(
* Find user and validate in ldap by uniq parameter from identityProviders
*
*/
private Map<String, Object> validateAndLoginUserAccessByUsername(@NotNull String login, @NotNull String password, @NotNull LdapSettings ldapSettings) throws DBException {
private Map<String, Object> validateAndLoginUserAccessByUsername(

Check warning on line 90 in server/bundles/io.cloudbeaver.service.ldap.auth/src/io/cloudbeaver/service/ldap/auth/LdapAuthProvider.java

View workflow job for this annotation

GitHub Actions / Server / Lint

[checkstyle] reported by reviewdog 🐶 'METHOD_DEF' should be separated from previous line. Raw Output: /github/workspace/./server/bundles/io.cloudbeaver.service.ldap.auth/src/io/cloudbeaver/service/ldap/auth/LdapAuthProvider.java:90:5: warning: 'METHOD_DEF' should be separated from previous line. (com.puppycrawl.tools.checkstyle.checks.whitespace.EmptyLineSeparatorCheck)
@NotNull String login,
@NotNull String password,
@NotNull LdapSettings ldapSettings
) throws DBException {
if (
CommonUtils.isEmpty(ldapSettings.getBindUserDN())
|| CommonUtils.isEmpty(ldapSettings.getBindUserPassword())
Expand Down Expand Up @@ -115,7 +119,11 @@ private Map<String, Object> validateAndLoginUserAccessByUsername(@NotNull String
* Find user and validate in ldap by fullUserDN
*/
private void validateUserAccess(@NotNull String fullUserDN, @NotNull LdapSettings ldapSettings) throws DBException {
if (CommonUtils.isEmpty(ldapSettings.getFilter()) || CommonUtils.isEmpty(ldapSettings.getBindUserDN()) || CommonUtils.isEmpty(ldapSettings.getBindUserPassword())) {
if (
CommonUtils.isEmpty(ldapSettings.getFilter())
|| CommonUtils.isEmpty(ldapSettings.getBindUserDN())
|| CommonUtils.isEmpty(ldapSettings.getBindUserPassword())

Check warning on line 125 in server/bundles/io.cloudbeaver.service.ldap.auth/src/io/cloudbeaver/service/ldap/auth/LdapAuthProvider.java

View workflow job for this annotation

GitHub Actions / Server / Lint

[checkstyle] reported by reviewdog 🐶 'if' child has incorrect indentation level 12, expected level should be 16. Raw Output: /github/workspace/./server/bundles/io.cloudbeaver.service.ldap.auth/src/io/cloudbeaver/service/ldap/auth/LdapAuthProvider.java:125:13: warning: 'if' child has incorrect indentation level 12, expected level should be 16. (com.puppycrawl.tools.checkstyle.checks.indentation.IndentationCheck)
) {
return;
}

Expand Down Expand Up @@ -309,7 +317,13 @@ private SearchControls createSearchControls() {
return searchControls;
}

private Map<String, Object> authenticateLdap(String userDN, String password, LdapSettings ldapSettings, @Nullable String login, Hashtable<String, String> environment) throws DBException {
private Map<String, Object> authenticateLdap(
String userDN,
String password,
LdapSettings ldapSettings,
@Nullable String login,
Hashtable<String, String> environment
) throws DBException {
environment.put(Context.SECURITY_PRINCIPAL, userDN);
environment.put(Context.SECURITY_CREDENTIALS, password);
DirContext userContext = null;
Expand Down

0 comments on commit 4dfd016

Please sign in to comment.