Again, since I’m stuck, I looked for different work that needed to be done and found the InstrumentingClassLoader. For some reason, it wouldn’t quite work anymore. It said something about an illegal method name
sleep<Wrapper>. I checked the file, everything seemed as always. In fact, when I instrumented the file offline, everything worked to the extent it was working before.
I’ve been tinkering with the class loader in general, making several other improvements, and don’t have it working yet, but it seems like Sun changed the behavior of
java.lang.ClassLoader in one of the Java 1.5.0 updates (currently, I have the 1.5.0_04 version installed). Before, ClassLoader would accept method names that include characters like < and >, even though they couldn’t be generated by Java programs. That’s exactly why I chose them. If classes are not loaded and instrumented on the fly, Java still has this behavior. But if a custom class loader is used now, these method names are being rejected.
I’ve changed my naming scheme to
$$$Old$$$. The triple-
$ is to avoid problems with James Sasitorn’s NexGen. I’ll still have to have a chat with him to make sure there won’t be any clashes. Testing both custom class loaders together will be interesting too.