harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From py...@apache.org
Subject svn commit: r426042 - /incubator/harmony/enhanced/classlib/trunk/modules/nio/src/main/java/java/nio/channels/spi/SelectorProvider.java
Date Thu, 27 Jul 2006 12:25:55 GMT
Author: pyang
Date: Thu Jul 27 05:25:54 2006
New Revision: 426042

URL: http://svn.apache.org/viewvc?rev=426042&view=rev
Log:
Second patch for HARMONY-961 ([classlib][nio]java.nio.channels.spi.SelectorProvider.inheritedChannel
must be implemented)

Modified:
    incubator/harmony/enhanced/classlib/trunk/modules/nio/src/main/java/java/nio/channels/spi/SelectorProvider.java

Modified: incubator/harmony/enhanced/classlib/trunk/modules/nio/src/main/java/java/nio/channels/spi/SelectorProvider.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/nio/src/main/java/java/nio/channels/spi/SelectorProvider.java?rev=426042&r1=426041&r2=426042&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/nio/src/main/java/java/nio/channels/spi/SelectorProvider.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/nio/src/main/java/java/nio/channels/spi/SelectorProvider.java
Thu Jul 27 05:25:54 2006
@@ -28,6 +28,7 @@
 import java.security.PrivilegedAction;
 import java.util.Enumeration;
 
+import org.apache.harmony.luni.platform.Platform;
 import org.apache.harmony.nio.internal.SelectorProviderImpl;
 
 /**
@@ -51,6 +52,8 @@
     private static final String PROVIDER_IN_JAR_RESOURCE = "META-INF/services/java.nio.channels.spi.SelectorProvider";
//$NON-NLS-1$
 
     private static SelectorProvider provider = null;
+    
+    private static Channel inheritedChannel; 
 
     /**
      * Constructor for this class.
@@ -237,12 +240,9 @@
      *             RuntimePermission("selectorProvider").
      */
     public Channel inheritedChannel() throws IOException {
-        return null;
-//        FIXME waiting for VM support      
-//        if (null == inheritedChannel) {
-//            inheritedChannel = OSComponentFactory.getNetworkSystem()
-//                    .inheritedChannel();
-//        }
-//        return inheritedChannel;
+        if (null == inheritedChannel) {
+            inheritedChannel = Platform.getNetworkSystem().inheritedChannel();
+        }
+        return inheritedChannel;
     }
 }



Mime
View raw message