2618N/A/*
5266N/A * Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved.
2618N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
2618N/A *
2618N/A * This code is free software; you can redistribute it and/or modify it
2618N/A * under the terms of the GNU General Public License version 2 only, as
2618N/A * published by the Free Software Foundation.
2618N/A *
2618N/A * This code is distributed in the hope that it will be useful, but WITHOUT
2618N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
2618N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
2618N/A * version 2 for more details (a copy is included in the LICENSE file that
2618N/A * accompanied this code).
2618N/A *
2618N/A * You should have received a copy of the GNU General Public License version
2618N/A * 2 along with this work; if not, write to the Free Software Foundation,
2618N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
2618N/A *
2618N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2618N/A * or visit www.oracle.com if you need additional information or have any
2618N/A * questions.
2618N/A */
2618N/A
2618N/A/*
2618N/A * @test
2618N/A * @bug 6676075
2618N/A * @summary RegistryContext (com.sun.jndi.url.rmi.rmiURLContext) coding problem
5266N/A * @library ../../../../../../java/rmi/testlibrary
5266N/A * @build TestLibrary
5266N/A * @run main ContextWithNullProperties
2618N/A */
2618N/A
5267N/Aimport com.sun.jndi.rmi.registry.RegistryContext;
5266N/Aimport java.rmi.registry.Registry;
2618N/A
2618N/Apublic class ContextWithNullProperties {
2618N/A public static void main(String[] args) throws Exception {
5266N/A Registry registry = TestLibrary.createRegistryOnUnusedPort();
5266N/A int registryPort = TestLibrary.getRegistryPort(registry);
2618N/A System.out.println("Connecting to the default Registry...");
2618N/A // Connect to the default Registry.
2618N/A // Pass null as the JNDI environment properties (see final argument)
5266N/A RegistryContext ctx = new RegistryContext(null, registryPort, null);
2618N/A }
2618N/A}