< prev index next >

jdk/test/javax/management/remote/mandatory/util/MapNullValuesTest.java

Print this page




  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 4982668
  27  * @summary Test that a map containing 'null' values is handled
  28  *          properly when converting the map into a hashtable,
  29  *          i.e. all 'null' values should be removed before creating
  30  *          the hashtable in order to avoid a NullPointerException.
  31  *          Check also that null values for keys are not allowed in
  32  *          the maps passed to the JMXConnector[Server] factories.
  33  * @author Luis-Miguel Alventosa
  34  * @modules java.management/com.sun.jmx.remote.util

  35  * @run clean MapNullValuesTest
  36  * @run build MapNullValuesTest
  37  * @run main MapNullValuesTest
  38  */
  39 
  40 import java.rmi.RemoteException;
  41 import java.rmi.registry.Registry;
  42 import java.rmi.registry.LocateRegistry;
  43 import java.util.HashMap;
  44 import java.util.Hashtable;
  45 import java.util.Iterator;
  46 import java.util.Map;
  47 import java.util.Set;
  48 import javax.management.MBeanServer;
  49 import javax.management.MBeanServerFactory;
  50 import javax.management.remote.JMXConnector;
  51 import javax.management.remote.JMXConnectorFactory;
  52 import javax.management.remote.JMXConnectorServer;
  53 import javax.management.remote.JMXConnectorServerFactory;
  54 import javax.management.remote.JMXServiceURL;




  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 4982668
  27  * @summary Test that a map containing 'null' values is handled
  28  *          properly when converting the map into a hashtable,
  29  *          i.e. all 'null' values should be removed before creating
  30  *          the hashtable in order to avoid a NullPointerException.
  31  *          Check also that null values for keys are not allowed in
  32  *          the maps passed to the JMXConnector[Server] factories.
  33  * @author Luis-Miguel Alventosa
  34  * @modules java.management.rmi
  35  *          java.management/com.sun.jmx.remote.util
  36  * @run clean MapNullValuesTest
  37  * @run build MapNullValuesTest
  38  * @run main MapNullValuesTest
  39  */
  40 
  41 import java.rmi.RemoteException;
  42 import java.rmi.registry.Registry;
  43 import java.rmi.registry.LocateRegistry;
  44 import java.util.HashMap;
  45 import java.util.Hashtable;
  46 import java.util.Iterator;
  47 import java.util.Map;
  48 import java.util.Set;
  49 import javax.management.MBeanServer;
  50 import javax.management.MBeanServerFactory;
  51 import javax.management.remote.JMXConnector;
  52 import javax.management.remote.JMXConnectorFactory;
  53 import javax.management.remote.JMXConnectorServer;
  54 import javax.management.remote.JMXConnectorServerFactory;
  55 import javax.management.remote.JMXServiceURL;


< prev index next >