HHH-7650 JandexHelper cannot handle Class default values

This commit is contained in:
brmeyer 2012-09-27 17:43:08 -04:00
parent 78060d8eac
commit 04b4383e39

View File

@ -360,6 +360,12 @@ private static Object getDefaultValue(AnnotationInstance annotation, String elem
} }
try { try {
val = Index.class.getClassLoader().loadClass( name ).getMethod( element ).getDefaultValue(); val = Index.class.getClassLoader().loadClass( name ).getMethod( element ).getDefaultValue();
if ( val != null ) {
// Annotation parameters of type Class are handled using Strings
if ( val instanceof Class ) {
val = ( ( Class ) val).getName();
}
}
DEFAULT_VALUES_BY_ELEMENT.put( fqElement, val ); DEFAULT_VALUES_BY_ELEMENT.put( fqElement, val );
return val == null ? null : val; return val == null ? null : val;
} }