Moti Asayag has submitted this change and it was merged.
Change subject: core: fix LockingInvocationHandler so that it does not throw
UndeclaredThrowableException
......................................................................
core: fix LockingInvocationHandler so that it does not throw
UndeclaredThrowableException
when using java.reflect.Proxy, proxied instance might fail with
runtime exception. In that case, if InvocationHandler contains
simple:
return method.invoke(instance, args);
such runtime exception will be 'upgraded' to controlled
InvocationTargetException. If caller is not aware of proxy being used
(which is kinda a point in using them), and he will not declare it in
throws clause (which he shouldn't do anyways) then this controlled
exception will be wrapped inside of UndeclaredThrowableException
runtime exception. This is totally not desirable.
Change-Id: I92e226147710666559781a42e3c25fc619dd727e
Bug-Url:
https://bugzilla.redhat.com/1378045
Signed-off-by: Martin Mucha <mmucha(a)redhat.com>
---
M
backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/lock/LockedObjectFactory.java
M
backend/manager/modules/utils/src/test/java/org/ovirt/engine/core/utils/lock/LockedObjectFactoryTest.java
2 files changed, 28 insertions(+), 1 deletion(-)
Approvals:
Martin Peřina: Looks good to me, approved
Martin Mucha: Verified; Looks good to me, but someone else must approve
Jenkins CI: Passed CI tests
--
To view, visit
https://gerrit.ovirt.org/64347
To unsubscribe, visit
https://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I92e226147710666559781a42e3c25fc619dd727e
Gerrit-PatchSet: 3
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Martin Mucha <mmucha(a)redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Marcin Mirecki <mmirecki(a)redhat.com>
Gerrit-Reviewer: Martin Mucha <mmucha(a)redhat.com>
Gerrit-Reviewer: Martin Peřina <mperina(a)redhat.com>
Gerrit-Reviewer: Moti Asayag <masayag(a)redhat.com>
Gerrit-Reviewer: Yevgeny Zaspitsky <yzaspits(a)redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation(a)ovirt.org>