Martin Peřina has uploaded a new change for review.

Change subject: core: Fix Coverity issue in AuditLogableBaseTest
......................................................................

core: Fix Coverity issue in AuditLogableBaseTest

Fixes false Coverity issue in getVdsWithVdsId() test, when null was
passed to setVds() and valid UUID was passed to setVdsId(). Because
getVds() checks for vdsId when vds is null, the method returned valid
VDS object using vdsId (but Coverity wasn't able to figure it out).

Change-Id: Id1d6b6ab0abc048adcdacbecb465802c0626b34d
Signed-off-by: Martin Perina <[email protected]>
---
M 
backend/manager/modules/dal/src/test/java/org/ovirt/engine/core/dal/dbbroker/auditloghandling/AuditLogableBaseTest.java
1 file changed, 0 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/06/37406/1

diff --git 
a/backend/manager/modules/dal/src/test/java/org/ovirt/engine/core/dal/dbbroker/auditloghandling/AuditLogableBaseTest.java
 
b/backend/manager/modules/dal/src/test/java/org/ovirt/engine/core/dal/dbbroker/auditloghandling/AuditLogableBaseTest.java
index 50eb6dd..784013a 100644
--- 
a/backend/manager/modules/dal/src/test/java/org/ovirt/engine/core/dal/dbbroker/auditloghandling/AuditLogableBaseTest.java
+++ 
b/backend/manager/modules/dal/src/test/java/org/ovirt/engine/core/dal/dbbroker/auditloghandling/AuditLogableBaseTest.java
@@ -708,11 +708,9 @@
     @Test
     public void getVdsWithVdsId() {
         final AuditLogableBase b = new TestAuditLogableBase();
-        final VDS vds = null;
         final VM vm = new VM();
         vm.setRunOnVds(GUID2);
         final Guid vdsId = GUID;
-        b.setVds(vds);
         b.setVdsId(vdsId);
         b.setVm(vm);
         final VDS v = b.getVds();


-- 
To view, visit http://gerrit.ovirt.org/37406
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id1d6b6ab0abc048adcdacbecb465802c0626b34d
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Martin Peřina <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to