1
1
/*
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.
3
3
* Copyright (c) 2019 SAP SE. All rights reserved.
4
4
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5
5
*
@@ -193,7 +193,7 @@ class ExceptionMessageBuilder : public StackObj {
193
193
int do_instruction (int bci);
194
194
195
195
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 );
197
197
198
198
public:
199
199
@@ -469,7 +469,7 @@ ExceptionMessageBuilder::ExceptionMessageBuilder(Method* method, int bci) :
469
469
_stacks = new GrowableArray<SimulatedOperandStack*> (len + 1 );
470
470
471
471
for (int i = 0 ; i <= len; ++i) {
472
- _stacks->push (NULL );
472
+ _stacks->push (nullptr );
473
473
}
474
474
475
475
// Initialize stack a bci 0.
@@ -481,7 +481,7 @@ ExceptionMessageBuilder::ExceptionMessageBuilder(Method* method, int bci) :
481
481
for (int i = 0 ; i < const_method->exception_table_length (); ++i) {
482
482
u2 index = et[i].handler_pc ;
483
483
484
- if (_stacks->at (index ) == NULL ) {
484
+ if (_stacks->at (index ) == nullptr ) {
485
485
_stacks->at_put (index , new SimulatedOperandStack ());
486
486
_stacks->at (index )->push (index , T_OBJECT);
487
487
}
@@ -499,7 +499,7 @@ ExceptionMessageBuilder::ExceptionMessageBuilder(Method* method, int bci) :
499
499
i += do_instruction (i);
500
500
501
501
// 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 )) {
503
503
_all_processed = true ;
504
504
break ;
505
505
}
@@ -512,7 +512,7 @@ ExceptionMessageBuilder::ExceptionMessageBuilder(Method* method, int bci) :
512
512
}
513
513
514
514
ExceptionMessageBuilder::~ExceptionMessageBuilder () {
515
- if (_stacks != NULL ) {
515
+ if (_stacks != nullptr ) {
516
516
for (int i = 0 ; i < _stacks->length (); ++i) {
517
517
delete _stacks->at (i);
518
518
}
@@ -522,7 +522,7 @@ ExceptionMessageBuilder::~ExceptionMessageBuilder() {
522
522
void ExceptionMessageBuilder::merge (int bci, SimulatedOperandStack* stack) {
523
523
assert (stack != _stacks->at (bci), " Cannot merge itself" );
524
524
525
- if (_stacks->at (bci) != NULL ) {
525
+ if (_stacks->at (bci) != nullptr ) {
526
526
stack->merge (*_stacks->at (bci));
527
527
} else {
528
528
// Got a new stack, so count the entries.
@@ -542,7 +542,7 @@ int ExceptionMessageBuilder::do_instruction(int bci) {
542
542
int len = Bytecodes::java_length_at (_method, code_base + bci);
543
543
544
544
// 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 ) {
546
546
_all_processed = false ;
547
547
return len;
548
548
}
@@ -1066,23 +1066,23 @@ int ExceptionMessageBuilder::do_instruction(int bci) {
1066
1066
// Put new stack to the next instruction, if we might reach it from
1067
1067
// this bci.
1068
1068
if (!flow_ended) {
1069
- if (_stacks->at (bci + len) == NULL ) {
1069
+ if (_stacks->at (bci + len) == nullptr ) {
1070
1070
_added_one = true ;
1071
1071
}
1072
1072
merge (bci + len, stack);
1073
1073
}
1074
1074
1075
1075
// Put the stack to the branch target too.
1076
1076
if (dest_bci != -1 ) {
1077
- if (_stacks->at (dest_bci) == NULL ) {
1077
+ if (_stacks->at (dest_bci) == nullptr ) {
1078
1078
_added_one = true ;
1079
1079
}
1080
1080
merge (dest_bci, stack);
1081
1081
}
1082
1082
1083
1083
// If we have more than one branch target, process these too.
1084
1084
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 ) {
1086
1086
_added_one = true ;
1087
1087
}
1088
1088
merge (dests.at (i), stack);
@@ -1200,7 +1200,7 @@ bool ExceptionMessageBuilder::print_NPE_cause0(outputStream* os, int bci, int sl
1200
1200
return false ;
1201
1201
}
1202
1202
1203
- if (_stacks->at (bci) == NULL ) {
1203
+ if (_stacks->at (bci) == nullptr ) {
1204
1204
return false ;
1205
1205
}
1206
1206
@@ -1228,7 +1228,7 @@ bool ExceptionMessageBuilder::print_NPE_cause0(outputStream* os, int bci, int sl
1228
1228
}
1229
1229
1230
1230
if (max_detail == _max_cause_detail &&
1231
- prefix != NULL &&
1231
+ prefix != nullptr &&
1232
1232
code != Bytecodes::_invokevirtual &&
1233
1233
code != Bytecodes::_invokespecial &&
1234
1234
code != Bytecodes::_invokestatic &&
1 commit comments
openjdk-notifier[bot] commentedon Jan 25, 2023
Review
Issues