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