Skip to content
Permalink
Browse files

8236661: launcher test PatchSystemModules.java start failing frequent…

…ly after JDK-8234049

Reviewed-by: alanb, mchung
  • Loading branch information
Brian Burkhalter
Brian Burkhalter committed Jan 14, 2020
1 parent 03cd98e commit 79ec4004d72a9ca0adc87874e1d8f1547c0edd17
Showing with 7 additions and 3 deletions.
  1. +7 −3 src/java.base/share/classes/sun/nio/ch/FileChannelImpl.java
@@ -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.
*
* This code is free software; you can redistribute it and/or modify it
@@ -49,6 +49,7 @@
import jdk.internal.access.SharedSecrets;
import jdk.internal.misc.ExtendedMapMode;
import jdk.internal.misc.Unsafe;
import jdk.internal.misc.VM;
import jdk.internal.ref.Cleaner;
import jdk.internal.ref.CleanerFactory;

@@ -1116,8 +1117,11 @@ private Unmapper mapInternal(MapMode mode, long position, long size, int prot, b
}

private boolean isSync(MapMode mode) {
return mode == ExtendedMapMode.READ_ONLY_SYNC ||
mode == ExtendedMapMode.READ_WRITE_SYNC;
// Do not want to initialize ExtendedMapMode until
// 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) {

0 comments on commit 79ec400

Please sign in to comment.