mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-18 01:54:47 +02:00
8230395: Code checks for NULL value returned from NEW_C_HEAP_ARRAY which can not happen
Reviewed-by: lkorinth, hseigel, thartmann, dnsimon
This commit is contained in:
parent
0e264cfe36
commit
23ec926327
16 changed files with 80 additions and 176 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2012, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -234,7 +234,7 @@ CPUPerformanceInterface::CPUPerformanceInterface() {
|
|||
|
||||
bool CPUPerformanceInterface::initialize() {
|
||||
_impl = new CPUPerformanceInterface::CPUPerformance();
|
||||
return _impl != NULL && _impl->initialize();
|
||||
return _impl->initialize();
|
||||
}
|
||||
|
||||
CPUPerformanceInterface::~CPUPerformanceInterface() {
|
||||
|
@ -355,7 +355,7 @@ SystemProcessInterface::SystemProcessInterface() {
|
|||
|
||||
bool SystemProcessInterface::initialize() {
|
||||
_impl = new SystemProcessInterface::SystemProcesses();
|
||||
return _impl != NULL && _impl->initialize();
|
||||
return _impl->initialize();
|
||||
}
|
||||
|
||||
SystemProcessInterface::~SystemProcessInterface() {
|
||||
|
@ -370,16 +370,11 @@ CPUInformationInterface::CPUInformationInterface() {
|
|||
|
||||
bool CPUInformationInterface::initialize() {
|
||||
_cpu_info = new CPUInformation();
|
||||
|
||||
if (NULL == _cpu_info) {
|
||||
return false;
|
||||
}
|
||||
_cpu_info->set_number_of_hardware_threads(VM_Version_Ext::number_of_threads());
|
||||
_cpu_info->set_number_of_cores(VM_Version_Ext::number_of_cores());
|
||||
_cpu_info->set_number_of_sockets(VM_Version_Ext::number_of_sockets());
|
||||
_cpu_info->set_cpu_name(VM_Version_Ext::cpu_name());
|
||||
_cpu_info->set_cpu_description(VM_Version_Ext::cpu_description());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -483,7 +478,7 @@ NetworkPerformanceInterface::~NetworkPerformanceInterface() {
|
|||
|
||||
bool NetworkPerformanceInterface::initialize() {
|
||||
_impl = new NetworkPerformanceInterface::NetworkPerformance();
|
||||
return _impl != NULL && _impl->initialize();
|
||||
return _impl->initialize();
|
||||
}
|
||||
|
||||
int NetworkPerformanceInterface::network_utilization(NetworkInterface** network_interfaces) const {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue