hazelcast/hazelcast — pull request #3334 by serkan-ozal (2014-08-20 12:53:37+00:00)
Title: Fix/3.x/issue 3047

The cause of issue is that results from inner predicate are sorted as keys but in "PagingPredicate", they are compared by its values by using hash-codes. If the hash-code method is not overriden, it can run in a infinite loop or loops for very long time since default implementation of "hashCode" method returns a generated number by using object's internal memory address.

Generally hash-codes are not meaningful for values but for keys. So if values are not comparable, even though iteration type is "VALUE", we should use keys for comparison.