From 74e12a55b710e1aa4317e4bee4e2162882be4b9e Mon Sep 17 00:00:00 2001 From: Simmo Saan Date: Thu, 12 Oct 2017 15:40:19 +0300 Subject: [PATCH] DATAREST-1148 - Fix eager toString() call on domain object in ResourceStatus. Originl pull request: #282. --- .../org/springframework/data/rest/webmvc/ResourceStatus.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-data-rest-webmvc/src/main/java/org/springframework/data/rest/webmvc/ResourceStatus.java b/spring-data-rest-webmvc/src/main/java/org/springframework/data/rest/webmvc/ResourceStatus.java index 2ea3b5ec9..188228bee 100644 --- a/spring-data-rest-webmvc/src/main/java/org/springframework/data/rest/webmvc/ResourceStatus.java +++ b/spring-data-rest-webmvc/src/main/java/org/springframework/data/rest/webmvc/ResourceStatus.java @@ -62,7 +62,7 @@ class ResourceStatus { 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())); + () -> String.format(INVALID_DOMAIN_OBJECT, domainObject, entity.getType())); // Check ETag for If-Non-Match