SEC-1165: Relax the requirement that the ObjectIdentity "type" be a Java class. Modified ObjectIdentity, changing the javaType property to "type" which is now a plain String. Also removes the requirement that the class be present on the classpath when creating the ObjectIdentityImpl instance (e.g. in the case of a permissions administration app which doesn't actually use the domain classes itself).
@ -73,12 +72,13 @@ public class ObjectIdentityImpl implements ObjectIdentity {
@@ -73,12 +72,13 @@ public class ObjectIdentityImpl implements ObjectIdentity {
thrownewIdentityUnavailableException("Could not extract identity from object "+object,e);
@ -123,15 +123,15 @@ public class ObjectIdentityImpl implements ObjectIdentity {
@@ -123,15 +123,15 @@ public class ObjectIdentityImpl implements ObjectIdentity {
}
}
returnjavaType.equals(other.javaType);
returntype.equals(other.type);
}
publicSerializablegetIdentifier(){
returnidentifier;
}
publicClass<?>getJavaType(){
returnjavaType;
publicStringgetType(){
returntype;
}
/**
@ -141,7 +141,7 @@ public class ObjectIdentityImpl implements ObjectIdentity {
@@ -141,7 +141,7 @@ public class ObjectIdentityImpl implements ObjectIdentity {
*/
publicinthashCode(){
intcode=31;
code^=this.javaType.hashCode();
code^=this.type.hashCode();
code^=this.identifier.hashCode();
returncode;
@ -150,7 +150,7 @@ public class ObjectIdentityImpl implements ObjectIdentity {
@@ -150,7 +150,7 @@ public class ObjectIdentityImpl implements ObjectIdentity {
@ -365,11 +365,10 @@ public final class BasicLookupStrategy implements LookupStrategy {
@@ -365,11 +365,10 @@ public final class BasicLookupStrategy implements LookupStrategy {