zafarkhaja/jsemver

hashCode violates contract in Version 0.7.1

robertschaft opened this issue · 2 comments

Quote from http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html#hashCode%28%29

If two objects are equal according to the equals(Object) method, then calling the
hashCode method on each of the two objects must produce the same integer result.

Because two versions are equal independent of their build metadata, the hashCode must not include the build metadata.

Thank you very much for reporting. Fixed and scheduled for the next release 0.7.2 as of 591b183.

0.7.2 released. Thanks once again.