Hi all,
I wonder if the implementation for 'equals', 'hashCode' and possibly
'toString' of UnmodifiableJMeterVariables are correct.
I think - for symmetry and since they are not the same classes - the
methods 'hashCode' and 'equals' should include a test for the class.
Currently with:
JMeterVariables vars = somehowGetThem();
UnmodifiableJMeterVariables unmodifiable = new
UnmodifiableJMeterVariables(vars);
we have
unmodifiable.equals(vars) == true
vars.equals(unmodifiable) != true
and
unmodifiable.hashCode() == vars.hashCode()
I think we should have
unmodifiable.equals(vars) != true
vars.equals(unmodifiable) != true
and
unmodifiable.hashCode() != vars.hashCode()
What do you think?
Felix