hibernate/hibernate-orm — pull request #353 by edalquist (2012-07-06 02:51:45+00:00)
Title: HHH-7431 HHH-7432 Don't pre-calc toString and use Type for equals

Remove toString pre-calculation to avoid excess memory usage.

Use Type.isEquals in the equals method for comparing the naturalId values.

Note the org.hibernate.test.cache.infinispan.functional.cluster.NaturalIdInvalidationTestCase test fails but I'm not quite sure why. As soon as the NaturalIdCacheKey retains the Type[] of references the test fails even with no other changes to the NaturalIdCacheKey class. I'm hoping that someone can help me figure out if it is a bug with the test or the class.