Juan Hernandez has posted comments on this change.

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


Patch Set 2: (1 inline comment)

Dropping commons-collections in the lib directory of the .ear is the easier 
solution to this problem, and that is exactly what we do at the moment. But the 
very nature of the issue is that commons-collections is using an incorrect way 
to load classes. It is assuming that int can load the classes of objects passed 
as arguments from its own class loader, and this is wrong. It happens to work 
because the classes passed by the client (our "tags" class in particular) 
happen to be loaded by the same class loader. If we happened to use this from a 
class inside the WEB-INF/lib directory of any of our .war applications it will 
fail.

....................................................
File 
backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/collections/CopyOnAccessMap.java
Line 71:             objectOut.writeObject(originalKey);
Line 72:             buffer = bufferOut.toByteArray();
Line 73:         }
Line 74:         catch (IOException exception) {
Line 75:             throw new RuntimeException(exception);
What would you propose? The signature of the method doesn't allow anything but 
an unchecked exception, and the original commons-collections implementation 
also used to throw a RuntimeException (well, it throws FunctorException, which 
is a direct subclass of RuntimeException). Would something like this be better?

  log.error("Error while serializing key \"" + key + "\" for copy on access 
map.", exception);
Line 76:         }
Line 77:         finally {
Line 78:             if (objectOut != null) {
Line 79:                 try {


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I218940edb8fbd9e3b10e4bf01dfc84ac84196213
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Juan Hernandez <juan.hernan...@redhat.com>
Gerrit-Reviewer: Allon Mureinik <amure...@redhat.com>
Gerrit-Reviewer: Juan Hernandez <juan.hernan...@redhat.com>
Gerrit-Reviewer: Yair Zaslavsky <yzasl...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to