mirror of
https://github.com/hibernate/hibernate-orm
synced 2025-02-28 06:49:09 +00:00
HHH-6133 add an additional AnnotationValue for each mocked AnnotationInstance to mark it is from xml
This commit is contained in:
parent
7e999e421d
commit
0e20d34cd8
@ -311,7 +311,14 @@ static AnnotationInstance create(DotName name, AnnotationTarget target, Annotati
|
||||
if ( values == null || values.length == 0 ) {
|
||||
values = EMPTY_ANNOTATION_VALUE_ARRAY;
|
||||
}
|
||||
return AnnotationInstance.create( name, target, values );
|
||||
return AnnotationInstance.create( name, target, addMockMark( values ) );
|
||||
}
|
||||
|
||||
private static AnnotationValue[] addMockMark(AnnotationValue[] values) {
|
||||
AnnotationValue[] newValues = new AnnotationValue[values.length + 1];
|
||||
System.arraycopy( values, 0, newValues, 0, values.length );
|
||||
newValues[values.length] = booleanValue( "isMocked", true );
|
||||
return newValues;
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user