> De: "Karen Kinnear" <[email protected]> > À: "valhalla-spec-experts" <[email protected]> > 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
