From b8e230c4e1b3781f904fa2e7237d10db6f6b0422 Mon Sep 17 00:00:00 2001 From: kgignatyev Date: Mon, 6 May 2024 11:34:31 -0700 Subject: [PATCH] Add offending type name to `AbstractRepositoryMetadata` verification exception message. Closes #3091 --- .../repository/core/support/AbstractRepositoryMetadata.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/springframework/data/repository/core/support/AbstractRepositoryMetadata.java b/src/main/java/org/springframework/data/repository/core/support/AbstractRepositoryMetadata.java index ae54f8abe..11c9131fe 100644 --- a/src/main/java/org/springframework/data/repository/core/support/AbstractRepositoryMetadata.java +++ b/src/main/java/org/springframework/data/repository/core/support/AbstractRepositoryMetadata.java @@ -41,6 +41,7 @@ import org.springframework.util.Assert; * @author Thomas Darimont * @author Jens Schauder * @author Mark Paluch + * @author Konstntin Ignatyev */ public abstract class AbstractRepositoryMetadata implements RepositoryMetadata { @@ -56,7 +57,7 @@ public abstract class AbstractRepositoryMetadata implements RepositoryMetadata { public AbstractRepositoryMetadata(Class repositoryInterface) { Assert.notNull(repositoryInterface, "Given type must not be null"); - Assert.isTrue(repositoryInterface.isInterface(), "Given type must be an interface"); + Assert.isTrue(repositoryInterface.isInterface(), "Given type ["+ repositoryInterface.getName()+"] must be an interface"); this.repositoryInterface = repositoryInterface; this.typeInformation = TypeInformation.of(repositoryInterface);