DATACMNS-677 - AnnotationBasedPersistentProperty now caches absence of annotations on accessor-only properties.
AnnotationBasedPersistentProperty now also caches the absence of properties that are expressed through accessors only. Previously the absence of a field caused us to skip the registration of the absence in the cache.
This commit is contained in:
@@ -201,8 +201,9 @@ public abstract class AnnotationBasedPersistentProperty<P extends PersistentProp
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the annotation found for the current {@link AnnotationBasedPersistentProperty}. Will prefer field
|
||||
* annotations over ones found at getters or setters.
|
||||
* Returns the annotation found for the current {@link AnnotationBasedPersistentProperty}. Will prefer getters or
|
||||
* setters annotations over ones found at the backing field as the former can be used to reconfigure the metadata in
|
||||
* subclasses.
|
||||
*
|
||||
* @param annotationType must not be {@literal null}.
|
||||
* @return
|
||||
@@ -229,7 +230,7 @@ public abstract class AnnotationBasedPersistentProperty<P extends PersistentProp
|
||||
}
|
||||
}
|
||||
|
||||
return field == null ? null : cacheAndReturn(annotationType, AnnotationUtils.getAnnotation(field, annotationType));
|
||||
return cacheAndReturn(annotationType, field == null ? null : AnnotationUtils.getAnnotation(field, annotationType));
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user