Change in ovirt-engine[master]: core: Don't use commons collections clone method

juan.hernandez at redhat.com juan.hernandez at redhat.com
Tue Feb 19 11:57:06 UTC 2013


Juan Hernandez has submitted this change and it was merged.

Change subject: core: Don't use commons collections clone method
......................................................................


core: Don't use commons collections clone method

The commons collections package provides a mechanism to clone an object
doing serialization and then deserialization. Unfortunatelly the
implementation uses its own class loader (the class loader that loaded
commons collections itself) to load the class of the serialized object.
This means that the deserialization will fail if commons collections
happens to use be loaded by a class loader that doesn't have access to
the class being cloned. This is what happens if we try to use a JBoss
module instead of dropping commons-collections in the lib directory of
the ear.

This patch implements the clone method so that it uses the context class
loader if possible, this solves the issue with separate class loaders.

Change-Id: I218940edb8fbd9e3b10e4bf01dfc84ac84196213
Signed-off-by: Juan Hernandez <juan.hernandez at redhat.com>
---
M backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/collections/CopyOnAccessMap.java
1 file changed, 70 insertions(+), 9 deletions(-)

Approvals:
  Juan Hernandez: Verified; Looks good to me, approved


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

Gerrit-MessageType: merged
Gerrit-Change-Id: I218940edb8fbd9e3b10e4bf01dfc84ac84196213
Gerrit-PatchSet: 5
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Juan Hernandez <juan.hernandez at redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini at redhat.com>
Gerrit-Reviewer: Juan Hernandez <juan.hernandez at redhat.com>
Gerrit-Reviewer: Yair Zaslavsky <yzaslavs at redhat.com>



More information about the Engine-commits mailing list