[serializer/performance] fixed broken hashCode() function

'parameterValues' was usually emptySet() 
so parameterValues.hashCode() returned 0 
which caused this hashCode() method to return 0

nothing but collisions when used as key in maps! duh!

Signed-off-by: Moritz Eysholdt <moritz.eysholdt@typefox.io>
This commit is contained in:
Moritz Eysholdt 2016-10-06 17:40:36 +02:00 committed by Moritz Eysholdt
parent 17a85f155d
commit 93ca0d1487

View file

@ -363,13 +363,13 @@ public abstract class SerializationContext implements ISerializationContext {
EClass type = getType();
int result = 1;
if (rule != null)
result *= rule.hashCode();
result = 31 * result + rule.hashCode();
if (action != null)
result *= action.hashCode() * 7;
result = 31 * result + action.hashCode();
if (type != null)
result *= type.hashCode() * 19;
result = 31 * result + type.hashCode();
if (parameterValues != null)
result *= parameterValues.hashCode() * 31;
result = 31 * result + parameterValues.hashCode();
return result;
}