2362N/A * Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved. 0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 0N/A * This code is free software; you can redistribute it and/or modify it 0N/A * under the terms of the GNU General Public License version 2 only, as 0N/A * published by the Free Software Foundation. 0N/A * This code is distributed in the hope that it will be useful, but WITHOUT 0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 0N/A * version 2 for more details (a copy is included in the LICENSE file that 0N/A * accompanied this code). 0N/A * You should have received a copy of the GNU General Public License version 0N/A * 2 along with this work; if not, write to the Free Software Foundation, 0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 2362N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 2362N/A * or visit www.oracle.com if you need additional information or have any 0N/A * @summary Test that a map containing 'null' values is handled 0N/A * properly when converting the map into a hashtable, 0N/A * i.e. all 'null' values should be removed before creating 0N/A * the hashtable in order to avoid a NullPointerException. 0N/A * Check also that null values for keys are not allowed in 0N/A * the maps passed to the JMXConnector[Server] factories. 0N/A * @author Luis-Miguel Alventosa 0N/A * @run clean MapNullValuesTest 0N/A * @run build MapNullValuesTest 0N/A * @run main MapNullValuesTest 0N/A }
else {
// Check for equality 0N/A echo(
"\n>>> MapToHashtable Test [" + i +
"]");
0N/A echo(
"\tTest [" + i +
"] PASSED!");
0N/A echo(
"\tTest [" + i +
"] FAILED!");
0N/A echo(
"\n>>> JMXConnectorServerFactory Test [" + i +
"]");
0N/A echo(
"\tCreate the RMI connector server");
0N/A port +
"/JMXConnectorServerFactory" + i);
0N/A echo(
"\tStart the RMI connector server");
0N/A echo(
"\tCall RMIConnectorServer.toJMXConnector(Map)");
0N/A echo(
"\tStop the RMI connector server");
0N/A echo(
"\tTest [" + i +
"] PASSED!");
0N/A echo(
"\tTest [" + i +
"] FAILED!");
0N/A echo(
"\n>>> JMXConnectorFactory Test [" + i +
"]");
0N/A echo(
"\tCreate the RMI connector server");
0N/A port +
"/JMXConnectorFactory" + i);
0N/A echo(
"\tStart the RMI connector server");
0N/A echo(
"\tCreate and connect the RMI connector");
0N/A echo(
"\tTest [" + i +
"] PASSED!");
0N/A echo(
"\tTest [" + i +
"] FAILED!");
0N/A echo(
"\tJMXConnectorServerFactory.newJMXConnectorServer()");
0N/A echo(
"\tJMXConnectorServerFactory.toJMXConnector()");
0N/A echo(
"\tJMXConnectorFactory.newJMXConnector()");
0N/A echo(
"\tJMXConnectorFactory.connect()");
0N/A echo(
"\tGot unexpected exception!");
0N/A // Create an RMI registry 0N/A // Failed to create RMI registry... 0N/A echo(
"\nFailed to create RMI registry on port " +
port);