justinmclean commented on code in PR #7300:
URL: https://github.com/apache/gravitino/pull/7300#discussion_r2114901974
##########
authorizations/authorization-common/src/main/java/org/apache/gravitino/authorization/jdbc/JdbcAuthorizationPlugin.java:
##########
@@ -119,19 +119,18 @@ public Boolean onRoleCreated(Role role) throws
AuthorizationPluginException {
List<String> sqls = getCreateRoleSQL(role.name());
boolean createdNewly = false;
for (String sql : sqls) {
- createdNewly = executeUpdateSQL(sql, "already exists");
+ createdNewly |= executeUpdateSQL(sql, "already exists");
Review Comment:
I don't think this is correct, as using or means that if only one it true
then the end result is true. I think you want to initially set it to true and
use "and" not "or". Also probably best not to use bitwise operators.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]