8280178: Remove os:: API's that just call system API's

Reviewed-by: iklam, ccheung, dholmes
This commit is contained in:
Harold Seigel 2022-01-20 13:10:33 +00:00
parent 98b157a79a
commit a4d201909c
19 changed files with 45 additions and 68 deletions

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2021, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2022, 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
@ -253,9 +253,9 @@ ClassFileStream* ClassPathDirEntry::open_stream(JavaThread* current, const char*
if (file_handle != -1) {
// read contents into resource array
u1* buffer = NEW_RESOURCE_ARRAY(u1, st.st_size);
size_t num_read = os::read(file_handle, (char*) buffer, st.st_size);
size_t num_read = ::read(file_handle, (char*) buffer, st.st_size);
// close file
os::close(file_handle);
::close(file_handle);
// construct ClassFileStream
if (num_read == (size_t)st.st_size) {
if (UsePerfData) {