Use Assert.state improve code readability.

Closes #3442
This commit is contained in:
Hyeon Sung
2024-04-23 17:44:48 +09:00
committed by Mark Paluch
parent a0a469af91
commit eefbdbf0b0

View File

@@ -79,10 +79,8 @@ class JpaPersistentEntityImpl<T> extends BasicPersistentEntity<T, JpaPersistentP
super.verify();
JpaPersistentProperty versionProperty = getVersionProperty();
if (versionProperty != null && versionProperty.isAnnotationPresent(Version.class)) {
throw new IllegalArgumentException(String.format(INVALID_VERSION_ANNOTATION, versionProperty));
}
Assert.state(versionProperty != null && versionProperty.isAnnotationPresent(Version.class),
() -> String.format(INVALID_VERSION_ANNOTATION, versionProperty));
}
JpaMetamodel getMetamodel() {