< prev index next >

test/java/rmi/Naming/UnderscoreHost.java

Print this page




  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 5083594
  27   * @summary Ensure that Naming.java correctly parses host names with '_' in
  28   * them.
  29   * @author Vinod Johnson
  30   *
  31   * @library ../testlibrary




  32   * @build TestLibrary UnderscoreHost_Stub
  33   * @run main/othervm UnderscoreHost
  34  */
  35 
  36 import java.io.IOException;
  37 import java.net.MalformedURLException;
  38 import java.net.ServerSocket;
  39 import java.net.Socket;
  40 import java.rmi.Naming;
  41 import java.rmi.Remote;
  42 import java.rmi.RemoteException;
  43 import java.rmi.registry.LocateRegistry;
  44 import java.rmi.registry.Registry;
  45 import java.rmi.server.RMISocketFactory;
  46 import java.rmi.server.UnicastRemoteObject;
  47 
  48 public class UnderscoreHost extends UnicastRemoteObject implements Remote {
  49     private static final String HOSTNAME = "foo_bar";
  50     private static final String NAME = "name";
  51     /*




  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 5083594
  27   * @summary Ensure that Naming.java correctly parses host names with '_' in
  28   * them.
  29   * @author Vinod Johnson
  30   *
  31   * @library ../testlibrary
  32   * @modules java.rmi/sun.rmi.registry
  33   *          java.rmi/sun.rmi.server
  34   *          java.rmi/sun.rmi.transport
  35   *          java.rmi/sun.rmi.transport.tcp
  36   * @build TestLibrary UnderscoreHost_Stub
  37   * @run main/othervm UnderscoreHost
  38  */
  39 
  40 import java.io.IOException;
  41 import java.net.MalformedURLException;
  42 import java.net.ServerSocket;
  43 import java.net.Socket;
  44 import java.rmi.Naming;
  45 import java.rmi.Remote;
  46 import java.rmi.RemoteException;
  47 import java.rmi.registry.LocateRegistry;
  48 import java.rmi.registry.Registry;
  49 import java.rmi.server.RMISocketFactory;
  50 import java.rmi.server.UnicastRemoteObject;
  51 
  52 public class UnderscoreHost extends UnicastRemoteObject implements Remote {
  53     private static final String HOSTNAME = "foo_bar";
  54     private static final String NAME = "name";
  55     /*


< prev index next >