mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-22 03:54:33 +02:00
8184157: (ch) AsynchronousFileChannel hangs with internal error when reading locked file
Reviewed-by: alanb
This commit is contained in:
parent
da6f042616
commit
a8af569fa0
5 changed files with 66 additions and 16 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2008, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2008, 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
|
||||
|
@ -115,7 +115,7 @@ Java_sun_nio_ch_WindowsAsynchronousFileChannelImpl_lockFile(JNIEnv *env, jobject
|
|||
if (error == ERROR_IO_PENDING) {
|
||||
return IOS_UNAVAILABLE;
|
||||
}
|
||||
JNU_ThrowIOExceptionWithLastError(env, "WriteFile failed");
|
||||
JNU_ThrowIOExceptionWithLastError(env, "LockFile failed");
|
||||
return IOS_THROWN;
|
||||
}
|
||||
return 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue