File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
substratevm/src/com.oracle.svm.util/src/com/oracle/svm/util Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -476,7 +476,16 @@ private static List<TypeAnnotationValue> getTypeAnnotationValuesFromRoot(Annotat
476476 */
477477 public Object getAnnotationDefaultValue (Annotated method ) {
478478 Annotated root = unwrap (method , null );
479- return root != null ? AnnotationValueSupport .getAnnotationDefaultValue ((ResolvedJavaMethod ) root ) : null ;
479+ if (root == null ) {
480+ return null ;
481+ }
482+ try {
483+ return AnnotationValueSupport .getAnnotationDefaultValue ((ResolvedJavaMethod ) root );
484+ } catch (IllegalArgumentException | BufferUnderflowException | GenericSignatureFormatError e ) {
485+ return new AnnotationFormatError (e );
486+ } catch (AnnotationFormatError e ) {
487+ return e ;
488+ }
480489 }
481490
482491 private static Annotated unwrap (Annotated element , List <AnnotationValue > injectedAnnotationsCollector ) {
You can’t perform that action at this time.
0 commit comments