Created
May 18, 2014 14:15
-
-
Save zgmnkv/0e7ac1fe91c7d51d41a3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.Serializable; | |
import java.lang.reflect.InvocationHandler; | |
import java.lang.reflect.Method; | |
import java.lang.reflect.Proxy; | |
public class PermGenTest { | |
public static void main(String[] args) { | |
//noinspection InfiniteLoopStatement | |
for (; ; ) { | |
ClassLoader classLoader = new ClassLoader() {}; | |
Proxy.newProxyInstance(classLoader, new Class<?>[] { Serializable.class }, new InvocationHandler() { | |
@Override | |
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { | |
return null; | |
} | |
}); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment