Change in ovirt-engine[master]: core: Remove DbUtils

amureini at redhat.com amureini at redhat.com
Mon Sep 12 14:41:06 UTC 2016


Allon Mureinik has submitted this change and it was merged.

Change subject: core: Remove DbUtils
......................................................................


core: Remove DbUtils

DbUtils' closeQuietly methods were just a nicety to avoid
boiler-plated code in the finally block of a try block handling JDBC
resources. Since Java 7, all JDBC resources are autoclosable, so
there's a much cleaner way of handling these issues - with a
try-with-resource block.

This patch converts all the usages of DbUtils to standard Java
try-with-resource blocks and removes this now-useless class
completely.

Change-Id: I6620228031c9f723b350e10820c5a8035fef241f
Signed-off-by: Allon Mureinik <amureini at redhat.com>
---
D backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/db/DbUtils.java
M backend/manager/tools/src/main/java/org/ovirt/engine/core/notifier/EngineMonitorService.java
M backend/manager/tools/src/main/java/org/ovirt/engine/core/notifier/dao/EventsManager.java
3 files changed, 26 insertions(+), 136 deletions(-)

Approvals:
  Martin Peřina: Looks good to me, approved
  Jenkins CI: Passed CI tests
  Allon Mureinik: Verified



-- 
To view, visit https://gerrit.ovirt.org/63691
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I6620228031c9f723b350e10820c5a8035fef241f
Gerrit-PatchSet: 3
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Allon Mureinik <amureini at redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Peřina <mperina at redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>



More information about the Engine-commits mailing list