src/java.base/share/classes/sun/nio/ch/AsynchronousSocketChannelImpl.java
changeset 50303 7164c3bb55df
parent 47216 71c04702a3d5
child 53419 eac105e3ec13
--- a/src/java.base/share/classes/sun/nio/ch/AsynchronousSocketChannelImpl.java	Wed May 30 08:52:59 2018 +0200
+++ b/src/java.base/share/classes/sun/nio/ch/AsynchronousSocketChannelImpl.java	Wed May 30 16:36:35 2018 +0530
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 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
@@ -40,6 +40,7 @@
 import java.util.concurrent.locks.*;
 import sun.net.NetHooks;
 import sun.net.ext.ExtendedSocketOptions;
+import static sun.net.ext.ExtendedSocketOptions.SOCK_STREAM;
 
 /**
  * Base implementation of AsynchronousSocketChannel
@@ -512,9 +513,7 @@
                 set.add(StandardSocketOptions.SO_REUSEPORT);
             }
             set.add(StandardSocketOptions.TCP_NODELAY);
-            ExtendedSocketOptions extendedOptions =
-                    ExtendedSocketOptions.getInstance();
-            set.addAll(extendedOptions.options());
+            set.addAll(ExtendedSocketOptions.options(SOCK_STREAM));
             return Collections.unmodifiableSet(set);
         }
     }