We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Assert.state
1 parent 8456d2e commit 56f2ee0Copy full SHA for 56f2ee0
spring-data-jpa/src/main/java/org/springframework/data/jpa/mapping/JpaPersistentEntityImpl.java
@@ -79,10 +79,8 @@ public void verify() {
79
super.verify();
80
81
JpaPersistentProperty versionProperty = getVersionProperty();
82
-
83
- if (versionProperty != null && versionProperty.isAnnotationPresent(Version.class)) {
84
- throw new IllegalArgumentException(String.format(INVALID_VERSION_ANNOTATION, versionProperty));
85
- }
+ Assert.state(versionProperty != null && versionProperty.isAnnotationPresent(Version.class),
+ () -> String.format(INVALID_VERSION_ANNOTATION, versionProperty));
86
}
87
88
JpaMetamodel getMetamodel() {
0 commit comments