On 22/12/2017 21:06, David Holmes wrote:
:
The existing code is somewhat suspect as the Location interface
implements Comparable but it does not specify what it means to compare
two Locations! That's a bug in itself. LocationImpl has decided how to
compare two LocaltionImp's (but doesn't even check they are in the
same VirtualMachine!). Can we generalize that to accommodate other
Location implementations? Your change allows for this to happen, but
it will only work as expected if the other Location implementations
use the same comparison basis as LocationImpl - which is unspecified.
I'm also wondering about the change to validateMirrors and this
assertion in the Mirror API:
"Any method on a Mirror that takes a Mirror as an parameter directly or
indirectly (e.g., as a element in a List) will throw VMMismatchException
if the mirrors are from different virtual machines."
There is an assumption in the implementation that two Mirror objects to
the same VM will be the same implementation type.
-Alan