src/java.base/share/native/libjava/NullPointerException.c
author goetz
Fri, 08 Feb 2019 14:15:05 +0100
branchJEP-8220715-NPE_messages
changeset 57271 1735d39dbff9
permissions -rw-r--r--
8218628: Add detailed message to NullPointerException describing what is null.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
57271
1735d39dbff9 8218628: Add detailed message to NullPointerException describing what is null.
goetz
parents:
diff changeset
     1
/*
1735d39dbff9 8218628: Add detailed message to NullPointerException describing what is null.
goetz
parents:
diff changeset
     2
 * Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved.
1735d39dbff9 8218628: Add detailed message to NullPointerException describing what is null.
goetz
parents:
diff changeset
     3
 * Copyright (c) 2019 SAP SE. All rights reserved.
1735d39dbff9 8218628: Add detailed message to NullPointerException describing what is null.
goetz
parents:
diff changeset
     4
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
1735d39dbff9 8218628: Add detailed message to NullPointerException describing what is null.
goetz
parents:
diff changeset
     5
 *
1735d39dbff9 8218628: Add detailed message to NullPointerException describing what is null.
goetz
parents:
diff changeset
     6
 * This code is free software; you can redistribute it and/or modify it
1735d39dbff9 8218628: Add detailed message to NullPointerException describing what is null.
goetz
parents:
diff changeset
     7
 * under the terms of the GNU General Public License version 2 only, as
1735d39dbff9 8218628: Add detailed message to NullPointerException describing what is null.
goetz
parents:
diff changeset
     8
 * published by the Free Software Foundation.  Oracle designates this
1735d39dbff9 8218628: Add detailed message to NullPointerException describing what is null.
goetz
parents:
diff changeset
     9
 * particular file as subject to the "Classpath" exception as provided
1735d39dbff9 8218628: Add detailed message to NullPointerException describing what is null.
goetz
parents:
diff changeset
    10
 * by Oracle in the LICENSE file that accompanied this code.
1735d39dbff9 8218628: Add detailed message to NullPointerException describing what is null.
goetz
parents:
diff changeset
    11
 *
1735d39dbff9 8218628: Add detailed message to NullPointerException describing what is null.
goetz
parents:
diff changeset
    12
 * This code is distributed in the hope that it will be useful, but WITHOUT
1735d39dbff9 8218628: Add detailed message to NullPointerException describing what is null.
goetz
parents:
diff changeset
    13
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
1735d39dbff9 8218628: Add detailed message to NullPointerException describing what is null.
goetz
parents:
diff changeset
    14
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
1735d39dbff9 8218628: Add detailed message to NullPointerException describing what is null.
goetz
parents:
diff changeset
    15
 * version 2 for more details (a copy is included in the LICENSE file that
1735d39dbff9 8218628: Add detailed message to NullPointerException describing what is null.
goetz
parents:
diff changeset
    16
 * accompanied this code).
1735d39dbff9 8218628: Add detailed message to NullPointerException describing what is null.
goetz
parents:
diff changeset
    17
 *
1735d39dbff9 8218628: Add detailed message to NullPointerException describing what is null.
goetz
parents:
diff changeset
    18
 * You should have received a copy of the GNU General Public License version
1735d39dbff9 8218628: Add detailed message to NullPointerException describing what is null.
goetz
parents:
diff changeset
    19
 * 2 along with this work; if not, write to the Free Software Foundation,
1735d39dbff9 8218628: Add detailed message to NullPointerException describing what is null.
goetz
parents:
diff changeset
    20
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
1735d39dbff9 8218628: Add detailed message to NullPointerException describing what is null.
goetz
parents:
diff changeset
    21
 *
1735d39dbff9 8218628: Add detailed message to NullPointerException describing what is null.
goetz
parents:
diff changeset
    22
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
1735d39dbff9 8218628: Add detailed message to NullPointerException describing what is null.
goetz
parents:
diff changeset
    23
 * or visit www.oracle.com if you need additional information or have any
1735d39dbff9 8218628: Add detailed message to NullPointerException describing what is null.
goetz
parents:
diff changeset
    24
 * questions.
1735d39dbff9 8218628: Add detailed message to NullPointerException describing what is null.
goetz
parents:
diff changeset
    25
 */
1735d39dbff9 8218628: Add detailed message to NullPointerException describing what is null.
goetz
parents:
diff changeset
    26
1735d39dbff9 8218628: Add detailed message to NullPointerException describing what is null.
goetz
parents:
diff changeset
    27
#include "jni.h"
1735d39dbff9 8218628: Add detailed message to NullPointerException describing what is null.
goetz
parents:
diff changeset
    28
#include "jvm.h"
1735d39dbff9 8218628: Add detailed message to NullPointerException describing what is null.
goetz
parents:
diff changeset
    29
1735d39dbff9 8218628: Add detailed message to NullPointerException describing what is null.
goetz
parents:
diff changeset
    30
#include "java_lang_NullPointerException.h"
1735d39dbff9 8218628: Add detailed message to NullPointerException describing what is null.
goetz
parents:
diff changeset
    31
1735d39dbff9 8218628: Add detailed message to NullPointerException describing what is null.
goetz
parents:
diff changeset
    32
JNIEXPORT jstring JNICALL
1735d39dbff9 8218628: Add detailed message to NullPointerException describing what is null.
goetz
parents:
diff changeset
    33
Java_java_lang_NullPointerException_getExtendedNPEMessage(JNIEnv *env, jobject throwable)
1735d39dbff9 8218628: Add detailed message to NullPointerException describing what is null.
goetz
parents:
diff changeset
    34
{
1735d39dbff9 8218628: Add detailed message to NullPointerException describing what is null.
goetz
parents:
diff changeset
    35
    return JVM_GetExtendedNPEMessage(env, throwable);
1735d39dbff9 8218628: Add detailed message to NullPointerException describing what is null.
goetz
parents:
diff changeset
    36
}