nestmates spec open issues
Remi Forax
forax at univ-mlv.fr
Wed Oct 25 15:33:32 UTC 2017
> De: "Karen Kinnear" <karen.kinnear at oracle.com>
> À: "valhalla-spec-experts" <valhalla-spec-experts at openjdk.java.net>
> Envoyé: Mercredi 25 Octobre 2017 16:45:51
> Objet: nestmates spec open issues
> ...
> 2. Core reflection APIs [ https://bugs.openjdk.java.net/browse/JDK-8188075 |
> https://bugs.openjdk.java.net/browse/JDK-8188075 ]
> John Rose proposed:
> a) Class.getnestHost() - defaults to itself if there is a resolution error
> b) Class.getNestMembers() - returns full nest, fallback of self if any
> resolution errors including it lists a nestHost that
> does not list it.
> [editor notes:
> - full statically defined nest from classfile attribute? As distinct from full
> dynamically
> currently loaded nest - right?
> - looks like John is proposing resolving the names, not just returning strings,
> and skipping any resolution failures
I do not like swallowing exceptions, it always make things harder to debug, so counter proposition:
Class<?> Class.getNestHost()
if there is no attribute, return this, throw aTypeNotPresentException if either the NestHost can not be loaded or the NestHost doesn't list this as its member.
Class<?>[] Class.getNestMembers()
scrub all members that are either not found or or not valid (not the same NestHost) from the array and always add this to the array.
...
> thanks,
> Karen
cheers,
Rémi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/valhalla-spec-experts/attachments/20171025/65c4458a/attachment.html>
More information about the valhalla-spec-experts
mailing list