< prev index next >

src/java.base/share/classes/sun/nio/ch/Util.java

Print this page
rev 57242 : imported patch 8234049.patch

@@ -35,10 +35,11 @@
 import java.security.PrivilegedAction;
 import java.util.Collection;
 import java.util.Iterator;
 import java.util.Set;
 
+import jdk.internal.access.foreign.MemorySegmentProxy;
 import jdk.internal.misc.TerminatingThreadLocal;
 import jdk.internal.misc.Unsafe;
 import sun.security.action.GetPropertyAction;
 
 public class Util {

@@ -414,11 +415,11 @@
                         Constructor<?> ctor = cl.getDeclaredConstructor(
                             new Class<?>[] { int.class,
                                              long.class,
                                              FileDescriptor.class,
                                              Runnable.class,
-                                             boolean.class });
+                                             boolean.class, MemorySegmentProxy.class});
                         ctor.setAccessible(true);
                         directByteBufferConstructor = ctor;
                     } catch (ClassNotFoundException   |
                              NoSuchMethodException    |
                              IllegalArgumentException |

@@ -441,11 +442,11 @@
             dbb = (MappedByteBuffer)directByteBufferConstructor.newInstance(
               new Object[] { size,
                              addr,
                              fd,
                              unmapper,
-                             isSync});
+                             isSync, null});
         } catch (InstantiationException |
                  IllegalAccessException |
                  InvocationTargetException e) {
             throw new InternalError(e);
         }

@@ -462,11 +463,11 @@
                         Constructor<?> ctor = cl.getDeclaredConstructor(
                             new Class<?>[] { int.class,
                                              long.class,
                                              FileDescriptor.class,
                                              Runnable.class,
-                                             boolean.class });
+                                             boolean.class, MemorySegmentProxy.class });
                         ctor.setAccessible(true);
                         directByteBufferRConstructor = ctor;
                     } catch (ClassNotFoundException |
                              NoSuchMethodException |
                              IllegalArgumentException |

@@ -489,11 +490,11 @@
             dbb = (MappedByteBuffer)directByteBufferRConstructor.newInstance(
               new Object[] { size,
                              addr,
                              fd,
                              unmapper,
-                             isSync});
+                             isSync, null});
         } catch (InstantiationException |
                  IllegalAccessException |
                  InvocationTargetException e) {
             throw new InternalError(e);
         }
< prev index next >