Henri Tremblay henri.tremblay at
Thu Jun 15 18:23:51 UTC 2017

Ok. I was expecting that answer. Thanks for confirming.

There was no workaround (by using some other class nearby I mean)? (Not
talking about ReflectionFactory)

On 13 June 2017 at 12:02, Alan Bateman <Alan.Bateman at> wrote:

> On 13/06/2017 15:53, Henri Tremblay wrote:
> Hi,
> I am back as promised.
> Another instantiator is using ObjectStreamClass.newInstance through
> reflection (setAccessible). I get, of course, a warning about it.
> I can fix it with --add-opens java.base/
> Can I do something that doesn't involve jvm arguments?
> ObjectStreamClass.newInstance is package private and never meant to be
> used from outside of the package. So the warning is correct and
> can only be suppressed by using `--add-open` to explicitly open the
> package. The warning or the use of `--add-opens` serves as remainder that
> this code is hacking into the JDK and that the hack break at some point.
> -Alan.

More information about the jdk9-dev mailing list