chibenwa commented on code in PR #2296: URL: https://github.com/apache/james-project/pull/2296#discussion_r1648441376
########## backends-common/postgres/src/main/java/org/apache/james/backends/postgres/PostgresTable.java: ########## @@ -52,11 +53,58 @@ default FinalStage supportsRowLevelSecurity() { } } + public abstract static class AdditionalAlterQuery { + private String query; + + public AdditionalAlterQuery(String query) { + this.query = query; + } + + abstract boolean isApplied(boolean rowLevelSecurityEnabled); Review Comment: > To change this, I have to refactor code in a lot places. Not an issue to me. https://www.teamten.com/lawrence/programming/prefer-enums-over-booleans.html I'm surprised I need to argue to use strong types. ########## backends-common/postgres/src/main/java/org/apache/james/backends/postgres/PostgresTable.java: ########## @@ -52,11 +53,58 @@ default FinalStage supportsRowLevelSecurity() { } } + public abstract static class AdditionalAlterQuery { + private String query; + + public AdditionalAlterQuery(String query) { + this.query = query; + } + + abstract boolean isApplied(boolean rowLevelSecurityEnabled); Review Comment: > To change this, I have to refactor code in a lot places. Not an issue to me. > I think rowLevelSecurityEnabled is enough to understand This is subjective. Rationals: https://www.teamten.com/lawrence/programming/prefer-enums-over-booleans.html I'm surprised I need to argue to use strong types. -- 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: notifications-unsubscr...@james.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@james.apache.org For additional commands, e-mail: notifications-h...@james.apache.org