SetLogNull.java revision 0
876bd2c70a93981cc80f8376284616bce4a0fefcChristian Maeder/*
cd2265c1c7279c901e34383275e0ca44a11d5d6cMingyi Liu * Copyright 2002 Sun Microsystems, Inc. All Rights Reserved.
e6d40133bc9f858308654afb1262b8b483ec5922Till Mossakowski * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
999434073eb1711d8db3a72a6405d86546553851Christian Maeder *
98890889ffb2e8f6f722b00e265a211f13b5a861Corneliu-Claudiu Prodescu * This code is free software; you can redistribute it and/or modify it
9af1cee46dd16ba0c55a904a9d21ee2200bca2aeMingyi Liu * under the terms of the GNU General Public License version 2 only, as
999434073eb1711d8db3a72a6405d86546553851Christian Maeder * published by the Free Software Foundation.
cd2265c1c7279c901e34383275e0ca44a11d5d6cMingyi Liu *
cd2265c1c7279c901e34383275e0ca44a11d5d6cMingyi Liu * This code is distributed in the hope that it will be useful, but WITHOUT
9af1cee46dd16ba0c55a904a9d21ee2200bca2aeMingyi Liu * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
492287e5f5e91783ee5e169f773f28cafe93a3a9Mingyi Liu * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
9af1cee46dd16ba0c55a904a9d21ee2200bca2aeMingyi Liu * version 2 for more details (a copy is included in the LICENSE file that
9af1cee46dd16ba0c55a904a9d21ee2200bca2aeMingyi Liu * accompanied this code).
9af1cee46dd16ba0c55a904a9d21ee2200bca2aeMingyi Liu *
876bd2c70a93981cc80f8376284616bce4a0fefcChristian Maeder * You should have received a copy of the GNU General Public License version
fc1fbf1aafe19687927b94718cb7fb53e15e00ccMingyi Liu * 2 along with this work; if not, write to the Free Software Foundation,
35f1440887c945c8017f1b5276deb7983effc4caChristian Maeder * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
19c97fabd26da17b494d68ad39c666569f9abafdChristian Maeder *
994cb04080e706c988e862231c299c9218141d84Christian Maeder * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
9af1cee46dd16ba0c55a904a9d21ee2200bca2aeMingyi Liu * CA 95054 USA or visit www.sun.com if you need additional information or
064798f3c3fa09a775361e886ff11cb997f721a7Christian Maeder * have any questions.
94e112d16f89130a688db8b03ad3224903f5e97eChristian Maeder */
2a5b885d9350ec6dd8bc4992ee91d2f68aa592f4Christian Maeder
6f449482b2ca9189ac5fe5d3b2e1cb8de6e10cbcMarkus Gross/* @test
addeb8164414bdefad8f4c5b4c5bdb8a45231253Markus Gross * @bug 4639762
f4470d285765580c53309826fd404b438cc29b9bMingyi Liu * @summary The method java.rmi.server.RemoteServer.setLog should never
3f540ec9f3d4356f7fe85a699f21bfe7f0e9e70eMingyi Liu * throw a NullPointerException when its argument is null even if it has
a739d7d8d0ce89e88af5ed6eb3379e9a295271c8Christian Maeder * never been invoked before, or even if its last invocation also had an
a739d7d8d0ce89e88af5ed6eb3379e9a295271c8Christian Maeder * argument of null.
a739d7d8d0ce89e88af5ed6eb3379e9a295271c8Christian Maeder * @author Peter Jones
a739d7d8d0ce89e88af5ed6eb3379e9a295271c8Christian Maeder *
a739d7d8d0ce89e88af5ed6eb3379e9a295271c8Christian Maeder * @run main/othervm SetLogNull
9af1cee46dd16ba0c55a904a9d21ee2200bca2aeMingyi Liu */
3f540ec9f3d4356f7fe85a699f21bfe7f0e9e70eMingyi Liu
f955439310a3bdfccb2543de3b9bd29480e1033fMingyi Liuimport java.rmi.server.RemoteServer;
9af1cee46dd16ba0c55a904a9d21ee2200bca2aeMingyi Liu
9af1cee46dd16ba0c55a904a9d21ee2200bca2aeMingyi Liupublic class SetLogNull {
94e112d16f89130a688db8b03ad3224903f5e97eChristian Maeder public static void main(String[] args) {
9af1cee46dd16ba0c55a904a9d21ee2200bca2aeMingyi Liu RemoteServer.setLog(null);
492287e5f5e91783ee5e169f773f28cafe93a3a9Mingyi Liu }
6f449482b2ca9189ac5fe5d3b2e1cb8de6e10cbcMarkus Gross}
6f449482b2ca9189ac5fe5d3b2e1cb8de6e10cbcMarkus Gross