HHH-7970 - Fix broken logic in JPAOverriddenAnnotationReader.getCacheable(): if element is null, you have to consider the @Cacheable annotation
per gripe from Andreas Joseph Krogh
This commit is contained in:
parent
74251d5185
commit
e2fc8b12db
|
@ -837,12 +837,13 @@ public class JPAOverriddenAnnotationReader implements AnnotationReader {
|
|||
}
|
||||
|
||||
private Cacheable getCacheable(Element element, XMLContext.Default defaults){
|
||||
if(element==null)return null;
|
||||
String attValue = element.attributeValue( "cacheable" );
|
||||
if(attValue!=null){
|
||||
AnnotationDescriptor ad = new AnnotationDescriptor( Cacheable.class );
|
||||
ad.setValue( "value", Boolean.valueOf( attValue ) );
|
||||
return AnnotationFactory.create( ad );
|
||||
if ( element != null ) {
|
||||
String attValue = element.attributeValue( "cacheable" );
|
||||
if ( attValue != null ) {
|
||||
AnnotationDescriptor ad = new AnnotationDescriptor( Cacheable.class );
|
||||
ad.setValue( "value", Boolean.valueOf( attValue ) );
|
||||
return AnnotationFactory.create( ad );
|
||||
}
|
||||
}
|
||||
if ( defaults.canUseJavaAnnotations() ) {
|
||||
return getJavaAnnotation( Cacheable.class );
|
||||
|
|
Loading…
Reference in New Issue