Skip to content

Commit

Permalink
Use equals method for string comparison
Browse files Browse the repository at this point in the history
  • Loading branch information
hisanhunais committed Mar 15, 2024
1 parent df47529 commit 3c97711
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9517,7 +9517,7 @@ public void addKeyManagerConfiguration(KeyManagerConfigurationDTO keyManagerConf
preparedStatement.setString(10, keyManagerConfigurationDTO.getExternalReferenceId());
preparedStatement.executeUpdate();
KeyManagerPermissionConfigurationDTO permissionDTO = keyManagerConfigurationDTO.getPermissions();
if (permissionDTO != null && permissionDTO.getPermissionType() != KeyManagerAccessPublic) {
if (permissionDTO != null && !KeyManagerAccessPublic.equals(permissionDTO.getPermissionType())) {
try (PreparedStatement addPermissionStatement = conn
.prepareStatement(SQLConstants.KeyManagerPermissionsSqlConstants
.ADD_KEY_MANAGER_PERMISSION_SQL)) {
Expand Down Expand Up @@ -9598,7 +9598,7 @@ public void updateKeyManagerConfiguration(KeyManagerConfigurationDTO keyManagerC
deletePermissionsStatement.executeUpdate();
}
KeyManagerPermissionConfigurationDTO permissionDTO = keyManagerConfigurationDTO.getPermissions();
if (permissionDTO != null && permissionDTO.getPermissionType() != KeyManagerAccessPublic) {
if (permissionDTO != null && !KeyManagerAccessPublic.equals(permissionDTO.getPermissionType())) {
try (PreparedStatement addPermissionStatement = conn.prepareStatement(SQLConstants
.KeyManagerPermissionsSqlConstants.ADD_KEY_MANAGER_PERMISSION_SQL)) {
for (String role : permissionDTO.getRoles()) {
Expand Down

0 comments on commit 3c97711

Please sign in to comment.