Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/ikvm-fork.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjfrijters <jfrijters>2011-08-19 13:19:01 +0400
committerjfrijters <jfrijters>2011-08-19 13:19:01 +0400
commit7f818863d06fead376ecdfd34062cdc70588a4cb (patch)
treebcbd56c40bc57814dac5427a457d626a76eaae83 /openjdk/sun/nio/ch
parent7737b9b19638620cf9965fc8b8e329d398ebc011 (diff)
Regression fix. Return a dummy FileDescriptor for mapping object.
Diffstat (limited to 'openjdk/sun/nio/ch')
-rw-r--r--openjdk/sun/nio/ch/FileDispatcherImpl.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/openjdk/sun/nio/ch/FileDispatcherImpl.java b/openjdk/sun/nio/ch/FileDispatcherImpl.java
index 7a47183c..e8d4a55b 100644
--- a/openjdk/sun/nio/ch/FileDispatcherImpl.java
+++ b/openjdk/sun/nio/ch/FileDispatcherImpl.java
@@ -253,7 +253,9 @@ class FileDispatcherImpl extends FileDispatcher
}
FileDescriptor duplicateForMapping(FileDescriptor fd) throws IOException {
- return fd;
+ // we return a dummy FileDescriptor, because we don't need it for mapping operations
+ // and we don't want the original to be closed
+ return new FileDescriptor();
}
@DllImportAttribute.Annotation(value="kernel32", SetLastError=true)