Sahina Bose has posted comments on this change.
Change subject: engine: Fixed redundant null check find bug error
......................................................................
Patch Set 1:
(1 comment)
....................................................
File
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/InitVdsOnUpCommand.java
Line 448:
Line 449: private boolean hostUuidExists(Guid addedServerUuid) {
Line 450: GlusterServerDao glusterServerDao =
DbFacade.getInstance().getGlusterServerDao();
Line 451: GlusterServer glusterServer =
glusterServerDao.getByGlusterServerUuid(addedServerUuid);
Line 452: if (glusterServer == null ||
glusterServer.getId().equals(getVds().getId())) {
Yes, I did verify it by running mvn findbugs:findbugs on bll module
I'm not sure why findbug has called it a redundant null check - it was indeed a
redundant check.
glusterServerDao.getByGlusterServerUuid(addedServerUuid) can return null and we
need to handle that case.
Line 453: return false;
Line 454: }
Line 455: return true;
Line 456: }
--
To view, visit http://gerrit.ovirt.org/22405
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I9652c52e2886a4c225b5a79985f18f7f372dd4e4
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Sahina Bose <[email protected]>
Gerrit-Reviewer: Alissa Bonas <[email protected]>
Gerrit-Reviewer: Kanagaraj M <[email protected]>
Gerrit-Reviewer: Oved Ourfali <[email protected]>
Gerrit-Reviewer: Sahina Bose <[email protected]>
Gerrit-Reviewer: Yair Zaslavsky <[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