[graalvm-dev] Question regarding "target class must inherit directly from Object"

Foivos Zakkak fzakkak at redhat.com
Thu Feb 18 14:26:20 PST 2021


Hello all,

In [1] I see:

// Not sure what happens if the target class is in a hierarchy - so prohibit that for now.
guarantee(annotatedClass.isInterface() == originalClass.isInterface(), "if original is interface, target must also be interface: %s", annotatedClass);
guarantee(originalClass.getSuperclass() == Object.class || originalClass.isInterface(), "target class must inherit directly from Object: %s", originalClass);

I was wondering if anything changed since that comment and the 
corresponding guarantees were added?
Does anyone know it's now safe to remove those guarantees?

Thanks in advance!

[1] 
https://github.com/oracle/graal/blob/51fe078b16e61bc50d95bdbbee9b0b0886b4c98d/substratevm/src/com.oracle.svm.hosted/src/com/oracle/svm/hosted/substitute/AnnotationSubstitutionProcessor.java#L573-L575

-- 
Foivos Zakkak
Senior Software Engineer, R&D Middleware
Red Hat
7B40 69D9 29BA AE91 C0B3 220A 0846 BFD1 03F0 4EA1

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://oss.oracle.com/pipermail/graalvm-dev/attachments/20210219/1116792e/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 495 bytes
Desc: OpenPGP digital signature
Url : http://oss.oracle.com/pipermail/graalvm-dev/attachments/20210219/1116792e/attachment.bin 


More information about the GraalVM-Dev mailing list