DATAREST-1148 - Fix eager toString() call on domain object in ResourceStatus.
Originl pull request: #282.
This commit is contained in:
committed by
Oliver Gierke
parent
80e2fc3a3a
commit
28bb6abfea
@@ -61,8 +61,10 @@ class ResourceStatus {
|
||||
Assert.notNull(requestHeaders, "Request headers must not be null!");
|
||||
Assert.notNull(domainObject, "Domain object must not be null!");
|
||||
Assert.notNull(entity, "PersistentEntity must not be null!");
|
||||
Assert.isTrue(entity.getType().isInstance(domainObject),
|
||||
String.format(INVALID_DOMAIN_OBJECT, domainObject, entity.getType()));
|
||||
|
||||
if (!entity.getType().isInstance(domainObject)) {
|
||||
throw new IllegalArgumentException(String.format(INVALID_DOMAIN_OBJECT, domainObject, entity.getType()));
|
||||
}
|
||||
|
||||
// Check ETag for If-Non-Match
|
||||
|
||||
|
||||
Reference in New Issue
Block a user