Update hashCodeValue before setting isHashCodeCalculated
This essentially make the hashCode calculation thread safe. There might be multiple threads calling hashCode. This allows each thread gets the same hashCode value.
@@ -245,10 +245,10 @@ public int hashCode()
return hashCodeValue;
}
- isHashCodeCalculated = true;
-
hashCodeValue = style.calculateHashCode(this);
+ isHashCodeCalculated = true;
+
return hashCodeValue;
}
