mirror of
https://github.com/spring-projects/spring-security.git
synced 2025-06-28 14:52:24 +00:00
SEC-532: Added test method for different hashCode calculation when different Serializable classes are used (the method is commmented as, now, it doesn't pass the test)
This commit is contained in:
parent
419a7a6426
commit
5d09f1264b
@ -158,6 +158,17 @@ public class ObjectIdentityTests extends TestCase {
|
|||||||
.hashCode() != obj.hashCode());
|
.hashCode() != obj.hashCode());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* public void testHashCodeDifferentSerializableTypes() throws Exception {
|
||||||
|
ObjectIdentity obj = new ObjectIdentityImpl(
|
||||||
|
"org.springframework.security.acls.objectidentity.ObjectIdentityTests$MockIdDomainObject", new Long(1));
|
||||||
|
Assert.assertEquals(new ObjectIdentityImpl(
|
||||||
|
"org.springframework.security.acls.objectidentity.ObjectIdentityTests$MockIdDomainObject", "1")
|
||||||
|
.hashCode(), obj.hashCode());
|
||||||
|
Assert.assertEquals(new ObjectIdentityImpl(
|
||||||
|
"org.springframework.security.acls.objectidentity.ObjectIdentityTests$MockIdDomainObject",
|
||||||
|
new Integer(1)).hashCode(), obj.hashCode());
|
||||||
|
}*/
|
||||||
|
|
||||||
public void testGetters() throws Exception {
|
public void testGetters() throws Exception {
|
||||||
ObjectIdentity obj = new ObjectIdentityImpl(
|
ObjectIdentity obj = new ObjectIdentityImpl(
|
||||||
"org.springframework.security.acls.objectidentity.ObjectIdentityTests$MockIdDomainObject", new Long(1));
|
"org.springframework.security.acls.objectidentity.ObjectIdentityTests$MockIdDomainObject", new Long(1));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user