Alon Bar-Lev has posted comments on this change. Change subject: aaa: removing dependency in DbUtils ......................................................................
Patch Set 1: (1 comment) http://gerrit.ovirt.org/#/c/26928/1/backend/manager/modules/builtin-extensions/src/main/java/org/ovirt/engine/extensions/aaa/builtin/tools/ManageDomainsDAOImpl.java File backend/manager/modules/builtin-extensions/src/main/java/org/ovirt/engine/extensions/aaa/builtin/tools/ManageDomainsDAOImpl.java: Line 43: ResultSet resultSet = null; Line 44: try (Connection connection = ds.getConnection(); Line 45: PreparedStatement prepareStatement = connection.prepareStatement(selectQuery);) { Line 46: log.info("getPermissionsForUser username: " + userName + " domain: " + domain); Line 47: prepareStatement.setString(1, userName); > i could not initialize the resultSet at the try (...) block so i could not why not: boolean ret = false; try( Connection connection = ds.getConnection(); PreparedStatement prepareStatement = connection.prepareStatement(selectQuery); ) { prepareStatement.setString(1, userName); prepareStatement.setString(2, domain); try (resultSet = prepareStatement.executeQuery()) { if (resultSet.next()) { ret = true; } } } return ret; no problem to continue check... we do need to understand if we can provide database access detach from the engine... but in this case it is not that important as we will not use this vdc_options in future anyway. you have the configuration information within environment ENGINE_DEFAULTS, ENGINE_VARS. maybe I will move LocalConfig to uutils. Line 48: prepareStatement.setString(2, domain); Line 49: Line 50: resultSet = prepareStatement.executeQuery(); Line 51: if (resultSet.next()) { -- To view, visit http://gerrit.ovirt.org/26928 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I235566046ca4d0d81ebdc61f7da5f2a05c2ce6cd Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Yair Zaslavsky <[email protected]> Gerrit-Reviewer: Alon Bar-Lev <[email protected]> Gerrit-Reviewer: Yair Zaslavsky <[email protected]> Gerrit-Reviewer: [email protected] Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
