3/7/18 10:44 PM:
Thanks a lot for this article. This is a perfect Heisenbug : incorrect documentation, outdated examples on the Internet, it doesn't always fail (depending on Java version and Garbage Collection) and its presence makes debugging much harder (no more Java object to talk to). I spent days looking for the source of the problem.