ResolveProxyClass.java revision 0
4843N/A * Copyright 1999 Sun Microsystems, Inc. All Rights Reserved. 0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 0N/A * This code is free software; you can redistribute it and/or modify it 0N/A * under the terms of the GNU General Public License version 2 only, as 2362N/A * published by the Free Software Foundation. 2362N/A * This code is distributed in the hope that it will be useful, but WITHOUT 0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 0N/A * version 2 for more details (a copy is included in the LICENSE file that 0N/A * accompanied this code). 0N/A * You should have received a copy of the GNU General Public License version 0N/A * 2 along with this work; if not, write to the Free Software Foundation, 0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 0N/A * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, 0N/A * CA 95054 USA or visit www.sun.com if you need additional information or 0N/A * @summary ObjectInputStream's default implementation of its protected 0N/A * resolveProxyClass method is specified to pass the first non-null class 0N/A * loader up the execution stack to the Proxy.getProxyClass method when 0N/A * it creates the specified proxy class; this test makes sure that it does 5503N/A * that in situations where it hadn't in the past, such as if the defining 0N/A * loaders of the interfaces were all strict ancestors of the first 0N/A * non-null loader up the stack. 0N/A * @author Peter Jones 0N/A * @build ResolveProxyClass 0N/A * @run main ResolveProxyClass 0N/A * This class is a dummy ObjectInputStream subclass that allows the 3471N/A * test code to access ObjectInputStream's protected resolveProxyClass 5182N/A * Set this thread's context class loader to null, so that the 5182N/A * resolveProxyClass implementation cannot cheat by guessing that 5182N/A * the context class loader is the appropriate loader to pass to 5182N/A * the Proxy.getProxyClass method. 0N/A * Expect the proxy class to be defined in the system class 0N/A * loader, because that is the defining loader of this test 0N/A * code, and it should be the first loader on the stack when 0N/A * ObjectInputStream.resolveProxyClass gets executed.