Skip to content

Commit c1281e6

Browse files
committedJan 29, 2024
8324678: Replace NULL with nullptr in HotSpot gtests
Reviewed-by: kbarrett, dholmes, jwaters
1 parent a6bdee4 commit c1281e6

File tree

74 files changed

+580
-580
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+580
-580
lines changed
 

‎test/hotspot/gtest/compiler/test_directivesParser.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -35,7 +35,7 @@ class DirectivesParserTest : public ::testing::Test{
3535
ResourceMark rm;
3636
stringStream stream;
3737
// These tests require the "C" locale to correctly parse decimal values
38-
DirectivesParserTest() : _locale(setlocale(LC_NUMERIC, NULL)) {
38+
DirectivesParserTest() : _locale(setlocale(LC_NUMERIC, nullptr)) {
3939
setlocale(LC_NUMERIC, "C");
4040
}
4141
~DirectivesParserTest() {

‎test/hotspot/gtest/gc/g1/test_freeRegionList.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -44,7 +44,7 @@ TEST_VM(FreeRegionList, length) {
4444

4545
// Create a fake heap. It does not need to be valid, as the HeapRegion constructor
4646
// does not access it.
47-
MemRegion heap(NULL, num_regions_in_test * HeapRegion::GrainWords);
47+
MemRegion heap(nullptr, num_regions_in_test * HeapRegion::GrainWords);
4848

4949
// Allocate a fake BOT because the HeapRegion constructor initializes
5050
// the BOT.

0 commit comments

Comments
 (0)
Please sign in to comment.