A broken setAccessible use case: enhanced diagnostics

Remi Forax forax at univ-mlv.fr
Thu Jan 26 14:39:26 UTC 2017

----- Mail original -----
> De: "Russell Gold" <russell.gold at oracle.com>
> À: "jigsaw-dev" <jigsaw-dev at 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 ?


More information about the jigsaw-dev mailing list