jaroslav@70: /* jaroslav@70: * Copyright (c) 1994, 2011, Oracle and/or its affiliates. All rights reserved. jaroslav@70: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. jaroslav@70: * jaroslav@70: * This code is free software; you can redistribute it and/or modify it jaroslav@70: * under the terms of the GNU General Public License version 2 only, as jaroslav@70: * published by the Free Software Foundation. Oracle designates this jaroslav@70: * particular file as subject to the "Classpath" exception as provided jaroslav@70: * by Oracle in the LICENSE file that accompanied this code. jaroslav@70: * jaroslav@70: * This code is distributed in the hope that it will be useful, but WITHOUT jaroslav@70: * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or jaroslav@70: * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License jaroslav@70: * version 2 for more details (a copy is included in the LICENSE file that jaroslav@70: * accompanied this code). jaroslav@70: * jaroslav@70: * You should have received a copy of the GNU General Public License version jaroslav@70: * 2 along with this work; if not, write to the Free Software Foundation, jaroslav@70: * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. jaroslav@70: * jaroslav@70: * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA jaroslav@70: * or visit www.oracle.com if you need additional information or have any jaroslav@70: * questions. jaroslav@70: */ jaroslav@70: jaroslav@70: package java.lang; jaroslav@70: jaroslav@70: /** jaroslav@70: * Thrown when an application attempts to use {@code null} in a jaroslav@70: * case where an object is required. These include: jaroslav@70: * jaroslav@70: *

jaroslav@70: * Applications should throw instances of this class to indicate jaroslav@70: * other illegal uses of the {@code null} object. jaroslav@70: * jaroslav@70: * {@code NullPointerException} objects may be constructed by the jaroslav@70: * virtual machine as if {@linkplain Throwable#Throwable(String, jaroslav@70: * Throwable, boolean, boolean) suppression were disabled and/or the jaroslav@70: * stack trace was not writable}. jaroslav@70: * jaroslav@70: * @author unascribed jaroslav@70: * @since JDK1.0 jaroslav@70: */ jaroslav@70: public jaroslav@70: class NullPointerException extends RuntimeException { jaroslav@70: private static final long serialVersionUID = 5162710183389028792L; jaroslav@70: jaroslav@70: /** jaroslav@70: * Constructs a {@code NullPointerException} with no detail message. jaroslav@70: */ jaroslav@70: public NullPointerException() { jaroslav@70: super(); jaroslav@70: } jaroslav@70: jaroslav@70: /** jaroslav@70: * Constructs a {@code NullPointerException} with the specified jaroslav@70: * detail message. jaroslav@70: * jaroslav@70: * @param s the detail message. jaroslav@70: */ jaroslav@70: public NullPointerException(String s) { jaroslav@70: super(s); jaroslav@70: } jaroslav@70: }