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 @@ public class MockHelper {
|
||||||
if ( values == null || values.length == 0 ) {
|
if ( values == null || values.length == 0 ) {
|
||||||
values = EMPTY_ANNOTATION_VALUE_ARRAY;
|
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…
Reference in New Issue