diff -r ea044aedc2b6 -r 455612b3161a src/java.base/unix/classes/sun/nio/ch/DatagramDispatcher.java --- a/src/java.base/unix/classes/sun/nio/ch/DatagramDispatcher.java Wed Nov 20 09:12:07 2019 +0100 +++ b/src/java.base/unix/classes/sun/nio/ch/DatagramDispatcher.java Wed Nov 20 08:35:53 2019 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 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 @@ -25,16 +25,16 @@ package sun.nio.ch; -import java.io.*; -import java.net.*; +import java.io.FileDescriptor; +import java.io.IOException; /** * Allows different platforms to call different native methods * for read and write operations. */ -class DatagramDispatcher extends NativeDispatcher -{ +class DatagramDispatcher extends NativeDispatcher { + static { IOUtil.load(); } @@ -63,6 +63,10 @@ FileDispatcherImpl.preClose0(fd); } + void dup(FileDescriptor fd1, FileDescriptor fd2) throws IOException { + FileDispatcherImpl.dup0(fd1, fd2); + } + static native int read0(FileDescriptor fd, long address, int len) throws IOException;