brooklyn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aledsage <...@git.apache.org>
Subject [GitHub] brooklyn-library pull request: Allow creating roles for PostgreSQL
Date Thu, 19 May 2016 11:15:05 GMT
Github user aledsage commented on a diff in the pull request:

    https://github.com/apache/brooklyn-library/pull/33#discussion_r63860470
  
    --- Diff: software/database/src/main/java/org/apache/brooklyn/entity/database/postgresql/PostgreSqlSshDriver.java
---
    @@ -320,6 +324,16 @@ private void initializeNewDatabase() {
                     "\"CREATE DATABASE %s OWNER %s\"",
                     StringEscapes.escapeSql(getDatabaseName()),
                     StringEscapes.escapeSql(getUsername()));
    +
    +        String createRolesAdditionalCommand = "";
    +
    +        if (!entity.getConfig(PostgreSqlNode.ROLES).isEmpty()) {
    --- End diff --
    
    This looks like it will throw an NPE if `ROLES` config value has not been set (because
it has no default value, such as an empty immutable map). Am I right?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message