----- Mail original ----- > De: "Russell Gold" <russell.g...@oracle.com> > À: "jigsaw-dev" <jigsaw-dev@openjdk.java.net> > Envoyé: Jeudi 26 Janvier 2017 13:34:54 > Objet: A broken setAccessible use case: enhanced diagnostics
> The Glassfish Primitive Function Library (PFL) contains an interesting use > case > for setAccessible: an enhanced object-to-string capability. Now, in an ideal > world, this shouldn’t be needed, as each object provides an adequate > toString() > method; however, it is not uncommon while trying to diagnose a problem, to > need > to see the actual state of objects, as represented by their fields, as the > toString() function often doesn’t show everything. This is especially > important > to diagnose problems in production, where one could ask a customer to enable a > debug flag. Until now, this was restricted only by the security manager. What > can we do to keep such a capability in JDK9? Apart using Unsafe, i do not know ? Rémi