Asaf Shakarchi has uploaded a new change for review. Change subject: engine: Assigned resultset to a local var in StandaloneDataSource:checkConnection() ......................................................................
engine: Assigned resultset to a local var in StandaloneDataSource:checkConnection() Assigned into a local variable the resultset of statement.executeQuery() method as findbugs reports this situation as a bug since the return value is not checked. Change-Id: Ia5b35703c28560b6aa01497bfef7f09319aebb3c Signed-off-by: Asaf Shakarchi <[email protected]> --- M backend/manager/tools/engine-tools-common/src/main/java/org/ovirt/engine/core/tools/common/db/StandaloneDataSource.java 1 file changed, 3 insertions(+), 1 deletion(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/59/10959/1 diff --git a/backend/manager/tools/engine-tools-common/src/main/java/org/ovirt/engine/core/tools/common/db/StandaloneDataSource.java b/backend/manager/tools/engine-tools-common/src/main/java/org/ovirt/engine/core/tools/common/db/StandaloneDataSource.java index f9edb71..7c8db2f 100644 --- a/backend/manager/tools/engine-tools-common/src/main/java/org/ovirt/engine/core/tools/common/db/StandaloneDataSource.java +++ b/backend/manager/tools/engine-tools-common/src/main/java/org/ovirt/engine/core/tools/common/db/StandaloneDataSource.java @@ -9,6 +9,7 @@ import java.lang.reflect.Proxy; import java.sql.Connection; import java.sql.DriverManager; +import java.sql.ResultSet; import java.sql.SQLException; import java.sql.SQLFeatureNotSupportedException; import java.sql.Statement; @@ -150,7 +151,8 @@ Statement statement = null; try { statement = connection.createStatement(); - statement.executeQuery("select null"); + @SuppressWarnings("unused") + ResultSet r = statement.executeQuery("select null"); } finally { if (statement != null) { -- To view, visit http://gerrit.ovirt.org/10959 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia5b35703c28560b6aa01497bfef7f09319aebb3c Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Asaf Shakarchi <[email protected]> _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
