--- a/src/java.base/windows/native/libnio/ch/FileChannelImpl.c Tue Aug 20 10:46:23 2019 +0200
+++ b/src/java.base/windows/native/libnio/ch/FileChannelImpl.c Tue Aug 20 10:11:53 2019 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 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
@@ -60,7 +60,7 @@
JNIEXPORT jlong JNICALL
Java_sun_nio_ch_FileChannelImpl_map0(JNIEnv *env, jobject this,
- jint prot, jlong off, jlong len)
+ jint prot, jlong off, jlong len, jboolean map_sync)
{
void *mapAddress = 0;
jint lowOffset = (jint)off;
@@ -87,6 +87,11 @@
mapAccess = FILE_MAP_COPY;
}
+ if (map_sync) {
+ JNU_ThrowInternalError(env, "should never call map on platform where MAP_SYNC is unimplemented");
+ return IOS_THROWN;
+ }
+
mapping = CreateFileMapping(
fileHandle, /* Handle of file */
NULL, /* Not inheritable */