jdk/test/java/io/ObjectInputStream/ResolveProxyClass.java
changeset 5810 e83d67ad8c96
parent 5506 202f599c92aa
child 7668 d4a77089c587
equal deleted inserted replaced
5809:6e38efd0293f 5810:e83d67ad8c96
    77              * Expect the proxy class to be defined in the system class
    77              * Expect the proxy class to be defined in the system class
    78              * loader, because that is the defining loader of this test
    78              * loader, because that is the defining loader of this test
    79              * code, and it should be the first loader on the stack when
    79              * code, and it should be the first loader on the stack when
    80              * ObjectInputStream.resolveProxyClass gets executed.
    80              * ObjectInputStream.resolveProxyClass gets executed.
    81              */
    81              */
    82             ClassLoader expectedLoader = ClassLoader.getSystemClassLoader();
    82             ClassLoader expectedLoader = ResolveProxyClass.class.getClassLoader();
    83 
    83 
    84             TestObjectInputStream in = new TestObjectInputStream();
    84             TestObjectInputStream in = new TestObjectInputStream();
    85             Class proxyClass = in.resolveProxyClass(
    85             Class proxyClass = in.resolveProxyClass(
    86                 new String[] { Runnable.class.getName() });
    86                 new String[] { Runnable.class.getName() });
    87             ClassLoader proxyLoader = proxyClass.getClassLoader();
    87             ClassLoader proxyLoader = proxyClass.getClassLoader();