8236661: launcher test PatchSystemModules.java start failing frequently after JDK-8234049
Reviewed-by: alanb, mchung
This commit is contained in:
parent
03cd98e15b
commit
79ec4004d7
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -49,6 +49,7 @@ import jdk.internal.access.JavaNioAccess;
|
|||||||
import jdk.internal.access.SharedSecrets;
|
import jdk.internal.access.SharedSecrets;
|
||||||
import jdk.internal.misc.ExtendedMapMode;
|
import jdk.internal.misc.ExtendedMapMode;
|
||||||
import jdk.internal.misc.Unsafe;
|
import jdk.internal.misc.Unsafe;
|
||||||
|
import jdk.internal.misc.VM;
|
||||||
import jdk.internal.ref.Cleaner;
|
import jdk.internal.ref.Cleaner;
|
||||||
import jdk.internal.ref.CleanerFactory;
|
import jdk.internal.ref.CleanerFactory;
|
||||||
|
|
||||||
@ -1116,8 +1117,11 @@ public class FileChannelImpl
|
|||||||
}
|
}
|
||||||
|
|
||||||
private boolean isSync(MapMode mode) {
|
private boolean isSync(MapMode mode) {
|
||||||
return mode == ExtendedMapMode.READ_ONLY_SYNC ||
|
// Do not want to initialize ExtendedMapMode until
|
||||||
mode == ExtendedMapMode.READ_WRITE_SYNC;
|
// after the module system has been initialized
|
||||||
|
return !VM.isModuleSystemInited() ? false :
|
||||||
|
(mode == ExtendedMapMode.READ_ONLY_SYNC ||
|
||||||
|
mode == ExtendedMapMode.READ_WRITE_SYNC);
|
||||||
}
|
}
|
||||||
|
|
||||||
private int toProt(MapMode mode) {
|
private int toProt(MapMode mode) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user