11/*
2- * Copyright (c) 2019, 2022 , Oracle and/or its affiliates. All rights reserved.
2+ * Copyright (c) 2019, 2023 , Oracle and/or its affiliates. All rights reserved.
33 * Copyright (c) 2019 SAP SE. All rights reserved.
44 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
55 *
@@ -193,7 +193,7 @@ class ExceptionMessageBuilder : public StackObj {
193193 int do_instruction (int bci);
194194
195195 bool print_NPE_cause0 (outputStream *os, int bci, int slot, int max_detail,
196- bool inner_expr = false , const char *prefix = NULL );
196+ bool inner_expr = false , const char *prefix = nullptr );
197197
198198 public:
199199
@@ -469,7 +469,7 @@ ExceptionMessageBuilder::ExceptionMessageBuilder(Method* method, int bci) :
469469 _stacks = new GrowableArray<SimulatedOperandStack*> (len + 1 );
470470
471471 for (int i = 0 ; i <= len; ++i) {
472- _stacks->push (NULL );
472+ _stacks->push (nullptr );
473473 }
474474
475475 // Initialize stack a bci 0.
@@ -481,7 +481,7 @@ ExceptionMessageBuilder::ExceptionMessageBuilder(Method* method, int bci) :
481481 for (int i = 0 ; i < const_method->exception_table_length (); ++i) {
482482 u2 index = et[i].handler_pc ;
483483
484- if (_stacks->at (index) == NULL ) {
484+ if (_stacks->at (index) == nullptr ) {
485485 _stacks->at_put (index, new SimulatedOperandStack ());
486486 _stacks->at (index)->push (index, T_OBJECT);
487487 }
@@ -499,7 +499,7 @@ ExceptionMessageBuilder::ExceptionMessageBuilder(Method* method, int bci) :
499499 i += do_instruction (i);
500500
501501 // If we want the data only for a certain bci, we can possibly end early.
502- if ((bci == i) && (_stacks->at (i) != NULL )) {
502+ if ((bci == i) && (_stacks->at (i) != nullptr )) {
503503 _all_processed = true ;
504504 break ;
505505 }
@@ -512,7 +512,7 @@ ExceptionMessageBuilder::ExceptionMessageBuilder(Method* method, int bci) :
512512}
513513
514514ExceptionMessageBuilder::~ExceptionMessageBuilder () {
515- if (_stacks != NULL ) {
515+ if (_stacks != nullptr ) {
516516 for (int i = 0 ; i < _stacks->length (); ++i) {
517517 delete _stacks->at (i);
518518 }
@@ -522,7 +522,7 @@ ExceptionMessageBuilder::~ExceptionMessageBuilder() {
522522void ExceptionMessageBuilder::merge (int bci, SimulatedOperandStack* stack) {
523523 assert (stack != _stacks->at (bci), " Cannot merge itself" );
524524
525- if (_stacks->at (bci) != NULL ) {
525+ if (_stacks->at (bci) != nullptr ) {
526526 stack->merge (*_stacks->at (bci));
527527 } else {
528528 // Got a new stack, so count the entries.
@@ -542,7 +542,7 @@ int ExceptionMessageBuilder::do_instruction(int bci) {
542542 int len = Bytecodes::java_length_at (_method, code_base + bci);
543543
544544 // If we have no stack for this bci, we cannot process the bytecode now.
545- if (_stacks->at (bci) == NULL ) {
545+ if (_stacks->at (bci) == nullptr ) {
546546 _all_processed = false ;
547547 return len;
548548 }
@@ -1066,23 +1066,23 @@ int ExceptionMessageBuilder::do_instruction(int bci) {
10661066 // Put new stack to the next instruction, if we might reach it from
10671067 // this bci.
10681068 if (!flow_ended) {
1069- if (_stacks->at (bci + len) == NULL ) {
1069+ if (_stacks->at (bci + len) == nullptr ) {
10701070 _added_one = true ;
10711071 }
10721072 merge (bci + len, stack);
10731073 }
10741074
10751075 // Put the stack to the branch target too.
10761076 if (dest_bci != -1 ) {
1077- if (_stacks->at (dest_bci) == NULL ) {
1077+ if (_stacks->at (dest_bci) == nullptr ) {
10781078 _added_one = true ;
10791079 }
10801080 merge (dest_bci, stack);
10811081 }
10821082
10831083 // If we have more than one branch target, process these too.
10841084 for (int64_t i = 0 ; i < dests.length (); ++i) {
1085- if (_stacks->at (dests.at (i)) == NULL ) {
1085+ if (_stacks->at (dests.at (i)) == nullptr ) {
10861086 _added_one = true ;
10871087 }
10881088 merge (dests.at (i), stack);
@@ -1200,7 +1200,7 @@ bool ExceptionMessageBuilder::print_NPE_cause0(outputStream* os, int bci, int sl
12001200 return false ;
12011201 }
12021202
1203- if (_stacks->at (bci) == NULL ) {
1203+ if (_stacks->at (bci) == nullptr ) {
12041204 return false ;
12051205 }
12061206
@@ -1228,7 +1228,7 @@ bool ExceptionMessageBuilder::print_NPE_cause0(outputStream* os, int bci, int sl
12281228 }
12291229
12301230 if (max_detail == _max_cause_detail &&
1231- prefix != NULL &&
1231+ prefix != nullptr &&
12321232 code != Bytecodes::_invokevirtual &&
12331233 code != Bytecodes::_invokespecial &&
12341234 code != Bytecodes::_invokestatic &&
0 commit comments