5266N/A * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. 5266N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 5266N/A * This code is free software; you can redistribute it and/or modify it 5266N/A * under the terms of the GNU General Public License version 2 only, as 5266N/A * published by the Free Software Foundation. 5266N/A * This code is distributed in the hope that it will be useful, but WITHOUT 5266N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 5266N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 5266N/A * version 2 for more details (a copy is included in the LICENSE file that 5266N/A * You should have received a copy of the GNU General Public License version 5266N/A * 2 along with this work; if not, write to the Free Software Foundation, 5266N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 5266N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 5266N/A * or visit www.oracle.com if you need additional information or have any 5551N/A * @build TestLibrary UnderscoreHost_Stub 0N/A * The socket factory captures the host name of the parsed URL, and 0N/A * then connects to the local host. 0N/A // Only set it the first time, subsequent DGC dirty calls 0N/A // will be local host 0N/A * This test is coded to pass whether java.net.URI obeys 0N/A * RFC 2396 or RFC 3986 (see 5085902, 6394131, etc.). 0N/A * If java.net.URI obeys RFC 3986, so host names may 0N/A * contain underscores, then the Naming.lookup invocation 0N/A * should succeed-- but the host actually connected to 0N/A * must equal HOSTNAME. 0N/A "java.rmi.Naming Parsing error:" +
0N/A * If java.net.URI obeys RFC 2396, so host names must not 0N/A * contain underscores, then the Naming.lookup invocation 0N/A * should throw MalformedURLException-- so this is OK.