DGCImplInsulation.java revision 169
/*
* Copyright 2001-2003 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
* CA 95054 USA or visit www.sun.com if you need additional information or
* have any questions.
*/
/* @test
* @bug 4465315
* @summary The RMI runtime's server-side DGC implementation object should
* not be exported with the arbitrary access control context that was in
* effect when it gets lazily created. For example, calls to it should not
* fail due to the "accept" SocketPermission check simply because of the
* access control context that it was exported with.
* @author Peter Jones
*
* @library ../../testlibrary
* @build TestLibrary
* @build DGCImplInsulation
* @build DGCImplInsulation_Stub
*/
private static final long TIMEOUT = 5000;
new AccessControlContext(new ProtectionDomain[] {
new ProtectionDomain(
try {
new ExportAction(impl));
throw new RuntimeException(
"TEST FAILED: remote object garbage collected");
} else {
}
} finally {
try {
} catch (Exception e) {
}
}
}
private static class ExportAction implements PrivilegedExceptionAction {
}
}
}
}