Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8267559: [lworld] [lw3] NPE thrown when attempting to write null to a null-free array has incorrect error message #422

wants to merge 1 commit into from
Changes from all commits
File filter

Filter by extension

Filter by extension

Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
@@ -1173,7 +1173,13 @@ int ExceptionMessageBuilder::get_NPE_null_slot(int bci) {

bool ExceptionMessageBuilder::print_NPE_cause(outputStream* os, int bci, int slot) {
if (print_NPE_cause0(os, bci, slot, _max_cause_detail, false, " because \"")) {
os->print("\" is null");
address code_base = _method->constMethod()->code_base();
Bytecodes::Code code = Bytecodes::java_code_at(_method, code_base + bci);
if (code == Bytecodes::_aastore) {
os->print("\" is null or is a null-free array and there's an attempt to store null in it");
} else {
os->print("\" is null");
return true;
return false;