diff -r fd2fccf3b079 -r 7164c3bb55df src/java.base/unix/classes/java/net/PlainDatagramSocketImpl.java --- a/src/java.base/unix/classes/java/net/PlainDatagramSocketImpl.java Wed May 30 08:52:59 2018 +0200 +++ b/src/java.base/unix/classes/java/net/PlainDatagramSocketImpl.java Wed May 30 16:36:35 2018 +0530 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2018, 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 @@ -28,6 +28,7 @@ import java.util.Set; import java.util.HashSet; import sun.net.ext.ExtendedSocketOptions; +import static sun.net.ext.ExtendedSocketOptions.SOCK_DGRAM; /* * On Unix systems we simply delegate to native methods. @@ -77,18 +78,10 @@ protected Set> supportedOptions() { HashSet> options = new HashSet<>(super.supportedOptions()); - addExtSocketOptions(extendedOptions.options(), options); + options.addAll(ExtendedSocketOptions.options(SOCK_DGRAM)); return options; } - private void addExtSocketOptions(Set> extOptions, - Set> options) { - // TCP_QUICKACK is applicable for TCP Sockets only. - extOptions.stream() - .filter((option) -> !option.name().equals("TCP_QUICKACK")) - .forEach((option) -> options.add(option)); - } - protected void socketSetOption(int opt, Object val) throws SocketException { if (opt == SocketOptions.SO_REUSEPORT && !supportedOptions().contains(StandardSocketOptions.SO_REUSEPORT)) {