/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
* @test
* @bug 4254808
* @summary Naming assumes '/' is present in relative URL; change in URL causes regression
* @author Dana Burns
* @library ../../testlibrary
* @build TestLibrary Legal LegalRegistryNames_Stub
* @run main LegalRegistryNames
*/
/**
* Ensure that all legal forms of Naming URLs operate with the
* java.rmi.Naming interface. This test requires using the default RMI Registry
* port as it tests all of the RMI naming URL's, including the ones which do not
* take a port (and therefore uses the default port).
*/
implements Legal
{
boolean oneFormFailed = false;
// create a registry and the test object
try {
legal = new LegalRegistryNames();
} catch (Exception e) {
}
// enumerate through all legal URLs to verify that a remote
// object can be bound and unbound
while (en.hasMoreElements()) {
try {
// ensure that the name in the registry is what is expected
{
oneFormFailed = true;
}
// ensure that the object can be unbound under the URL string
} catch (Exception e) {
e.printStackTrace();
oneFormFailed = true;
"exception for form: " + s + e.getMessage() );
}
}
if (oneFormFailed) {
}
// get the test to exit quickly
}
/**
* return a vector of valid legal RMI naming URLs.
*/
// get the local host name and address
try {
} catch(UnknownHostException e) {
}
"/MyName");
return legalForms;
}
}