test/java/rmi/Naming/legalRegistryNames/LegalRegistryNames.java

Print this page
rev 9077 : 8031179: update RMI tests to declare othervm explicitly
Summary: The /othervm declaration should be added to all the RMI tests and the RMI directories removed from the othervm.dirs property
Reviewed-by: smarks
Contributed-by: Eric Wang <yiming.wang@oracle.com>


  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 /*
  25  * @test
  26  * @bug 4254808
  27  * @summary Naming assumes '/' is present in relative URL; change in URL causes regression
  28  * @author Dana Burns
  29  * @library ../../testlibrary
  30  * @build TestLibrary Legal LegalRegistryNames_Stub
  31  * @run main LegalRegistryNames
  32  */
  33 
  34 import java.net.InetAddress;
  35 import java.net.UnknownHostException;
  36 import java.rmi.Naming;
  37 import java.rmi.RemoteException;
  38 import java.rmi.Remote;
  39 import java.rmi.registry.LocateRegistry;
  40 import java.rmi.registry.Registry;
  41 import java.rmi.server.UnicastRemoteObject;
  42 import java.util.Enumeration;
  43 import java.util.Vector;
  44 
  45 /**
  46  * Ensure that all legal forms of Naming URLs operate with the
  47  * java.rmi.Naming interface.  This test requires using the default RMI Registry
  48  * port as it tests all of the RMI naming URL's, including the ones which do not
  49  * take a port (and therefore uses the default port).
  50  */
  51 public class LegalRegistryNames extends UnicastRemoteObject




  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 /*
  25  * @test
  26  * @bug 4254808
  27  * @summary Naming assumes '/' is present in relative URL; change in URL causes regression
  28  * @author Dana Burns
  29  * @library ../../testlibrary
  30  * @build TestLibrary Legal LegalRegistryNames_Stub
  31  * @run main/othervm LegalRegistryNames
  32  */
  33 
  34 import java.net.InetAddress;
  35 import java.net.UnknownHostException;
  36 import java.rmi.Naming;
  37 import java.rmi.RemoteException;
  38 import java.rmi.Remote;
  39 import java.rmi.registry.LocateRegistry;
  40 import java.rmi.registry.Registry;
  41 import java.rmi.server.UnicastRemoteObject;
  42 import java.util.Enumeration;
  43 import java.util.Vector;
  44 
  45 /**
  46  * Ensure that all legal forms of Naming URLs operate with the
  47  * java.rmi.Naming interface.  This test requires using the default RMI Registry
  48  * port as it tests all of the RMI naming URL's, including the ones which do not
  49  * take a port (and therefore uses the default port).
  50  */
  51 public class LegalRegistryNames extends UnicastRemoteObject