Instead of using ProtectionDomain.getCodeSource to find the agent jar,
use the ClassLoader that loaded Agent.class. The CodeSource might be
null (e.g. when testing the IntelliJ plugin), but the class loader will
always be able to say where Agent.class was loaded from.
Also, avoid an NPE when a Proxy method returns void.
Instead of using ProtectionDomain.getCodeSource to find the agent jar, use the ClassLoader that loaded Agent.class. The CodeSource might be null (e.g. when testing the IntelliJ plugin), but the class loader will always be able to say where Agent.class was loaded from.
Also, avoid an NPE when a Proxy method returns void.
Fixes #257 . Fixes #258 .