Change in ovirt-engine[master]: core: EJBUtilsStratehy - fix NPE in error log

amureini at redhat.com amureini at redhat.com
Sun Feb 24 06:40:46 UTC 2013


Allon Mureinik has submitted this change and it was merged.

Change subject: core: EJBUtilsStratehy - fix NPE in error log
......................................................................


core: EJBUtilsStratehy - fix NPE in error log

In the findBean method, jndiNameSB is initialized inside the try block,
but referenced in the catch block.
If an exception was thrown before it was initialized, calling its
toString() will cause a NullPointerException.

This patch replaces the call of append(jndiNameSB.toString()) with
append(jndiNameSB), which is null-safe.

Change-Id: I6e29a2f69e68a2cc12768409fcba0162926638d7
Signed-off-by: Allon Mureinik <amureini at redhat.com>
---
M backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/ejb/EJBUtilsStrategy.java
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Tal Nisan: Looks good to me, approved
  Allon Mureinik: Verified
  Yair Zaslavsky: Looks good to me, approved


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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6e29a2f69e68a2cc12768409fcba0162926638d7
Gerrit-PatchSet: 3
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Allon Mureinik <amureini at redhat.com>
Gerrit-Reviewer: Alissa Bonas <abonas at redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini at redhat.com>
Gerrit-Reviewer: Daniel Erez <derez at redhat.com>
Gerrit-Reviewer: Liron Aravot <laravot at redhat.com>
Gerrit-Reviewer: Maor Lipchuk <mlipchuk at redhat.com>
Gerrit-Reviewer: Tal Nisan <tnisan at redhat.com>
Gerrit-Reviewer: Vered Volansky <vvolansk at redhat.com>
Gerrit-Reviewer: Yair Zaslavsky <yzaslavs at redhat.com>



More information about the Engine-commits mailing list