Skip to content

Commit b9417e5

Browse files
committed
Polishing.
Invert condition to trigger exception. See #3442
1 parent 56f2ee0 commit b9417e5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

spring-data-jpa/src/main/java/org/springframework/data/jpa/mapping/JpaPersistentEntityImpl.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ public void verify() {
7979
super.verify();
8080

8181
JpaPersistentProperty versionProperty = getVersionProperty();
82-
Assert.state(versionProperty != null && versionProperty.isAnnotationPresent(Version.class),
82+
Assert.state(versionProperty == null || !versionProperty.isAnnotationPresent(Version.class),
8383
() -> String.format(INVALID_VERSION_ANNOTATION, versionProperty));
8484
}
8585

0 commit comments

Comments
 (0)