EvilInstrument.java is aptly named, the test is in indeed evil in that its transformer is invoked to do file and socket I/O at every class load, including when loading implementations of the socket I/O classes. This test will need changes to allow it work with the SocketImpl being developed in the sandbox (niosocketimpl-branch) in order to avoid recursive initialization issues and NPE in random places. The test only works with the old SocketImpl because most of that implementation is in native code and so there aren't additional classes when socket I/O is performed. In the new implementation, the first socket I/O operations lead to class loading events and the transformer re-running.