Skip to content

Commit 51c3622

Browse files
committed
squash: fix jck failure
1 parent 0e76546 commit 51c3622

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

substratevm/src/com.oracle.svm.util/src/com/oracle/svm/util/AnnotatedObjectAccess.java

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff 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) {

0 commit comments

Comments
 (0)