HHH-18149 fix for HibernateProcessor on ecj

A typecast which works on javac doesn't work on ecj,
but I agree that ecj is correct here.

Signed-off-by: Gavin King <gavin@hibernate.org>
This commit is contained in:
Gavin King 2024-05-22 10:39:59 +02:00
parent 8ceed5ab5a
commit b30b510381
1 changed files with 8 additions and 8 deletions

View File

@ -71,10 +71,10 @@ public abstract class AnnotationMeta implements Metamodel {
final AnnotationValue value = getAnnotationValue( mirror, "value" ); final AnnotationValue value = getAnnotationValue( mirror, "value" );
if ( value != null ) { if ( value != null ) {
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
final List<? extends AnnotationMirror> values = final List<? extends AnnotationValue> annotationValues =
(List<? extends AnnotationMirror>) value.getValue(); (List<? extends AnnotationValue>) value.getValue();
for ( AnnotationMirror annotationMirror : values ) { for ( AnnotationValue annotationValue : annotationValues ) {
handleNamedQuery( annotationMirror, checkHql ); handleNamedQuery( (AnnotationMirror) annotationValue.getValue(), checkHql );
} }
} }
} }
@ -134,10 +134,10 @@ public abstract class AnnotationMeta implements Metamodel {
final AnnotationValue value = getAnnotationValue( mirror, "value" ); final AnnotationValue value = getAnnotationValue( mirror, "value" );
if ( value != null ) { if ( value != null ) {
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
final List<? extends AnnotationMirror> values = final List<? extends AnnotationValue> annotationValues =
(List<? extends AnnotationMirror>) value.getValue(); (List<? extends AnnotationValue>) value.getValue();
for ( AnnotationMirror annotationMirror : values ) { for ( AnnotationValue annotationValue : annotationValues ) {
addAuxiliaryMembersForMirror( annotationMirror, prefix ); addAuxiliaryMembersForMirror( (AnnotationMirror) annotationValue.getValue(), prefix );
} }
} }
} }