test/java/rmi/registry/emptyName/EmptyName.java

Print this page

        

*** 22,40 **** */ /* @test * @bug 4399304 * @summary check that registry allows empty names * @run main/othervm EmptyName */ import java.rmi.registry.LocateRegistry; import java.rmi.registry.Registry; import java.rmi.server.RemoteObject; public class EmptyName { public static void main(String[] args) throws Exception { ! Registry impl = LocateRegistry.createRegistry(0); Registry stub = (Registry) RemoteObject.toStub(impl); stub.bind("", stub); stub.lookup(""); stub.rebind("", stub); stub.lookup(""); --- 22,42 ---- */ /* @test * @bug 4399304 * @summary check that registry allows empty names + * @library ../../testlibrary + * @build TestLibrary * @run main/othervm EmptyName */ import java.rmi.registry.LocateRegistry; import java.rmi.registry.Registry; import java.rmi.server.RemoteObject; public class EmptyName { public static void main(String[] args) throws Exception { ! Registry impl = TestLibrary.createRegistryOnUnusedPort(); Registry stub = (Registry) RemoteObject.toStub(impl); stub.bind("", stub); stub.lookup(""); stub.rebind("", stub); stub.lookup("");