harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ghar...@apache.org
Subject svn commit: r415654 - in /incubator/harmony/enhanced/classlib/trunk/modules/nio/src: main/java/org/apache/harmony/nio/internal/DatagramChannelImpl.java test/java/org/apache/harmony/tests/java/nio/channels/DatagramChannelTest.java
Date Tue, 20 Jun 2006 14:30:20 GMT
Author: gharley
Date: Tue Jun 20 07:30:19 2006
New Revision: 415654

URL: http://svn.apache.org/viewvc?rev=415654&view=rev
Log:
HARMONY-616 : Remove one FIXME from "receive(ByteBuffer)" method of org.apache.harmony.nio.internal.DatagramChannelImpl

Modified:
    incubator/harmony/enhanced/classlib/trunk/modules/nio/src/main/java/org/apache/harmony/nio/internal/DatagramChannelImpl.java
    incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/java/org/apache/harmony/tests/java/nio/channels/DatagramChannelTest.java

Modified: incubator/harmony/enhanced/classlib/trunk/modules/nio/src/main/java/org/apache/harmony/nio/internal/DatagramChannelImpl.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/nio/src/main/java/org/apache/harmony/nio/internal/DatagramChannelImpl.java?rev=415654&r1=415653&r2=415654&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/nio/src/main/java/org/apache/harmony/nio/internal/DatagramChannelImpl.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/nio/src/main/java/org/apache/harmony/nio/internal/DatagramChannelImpl.java
Tue Jun 20 07:30:19 2006
@@ -229,17 +229,6 @@
         checkOpen();
 
         if (!isBound) {
-            // FIXME RI seems does not perform as datagram socket
-            // SecurityManager security = System.getSecurityManager();
-            // if (security != null)
-            // security.checkListen(0);
-            // final byte[] any = new byte[] { 0, 0, 0, 0 };
-            // try {
-            // networkSystem.bind(fd, 0, InetAddress.getByAddress(any));
-            // } catch (UnknownHostException e) {
-            // // impossible,do nothing
-            // }
-            // isBound = true;
             return null;
         }
 
@@ -729,4 +718,4 @@
             super.disconnect();
         }
     }
-}
\ No newline at end of file
+}

Modified: incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/java/org/apache/harmony/tests/java/nio/channels/DatagramChannelTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/java/org/apache/harmony/tests/java/nio/channels/DatagramChannelTest.java?rev=415654&r1=415653&r2=415654&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/java/org/apache/harmony/tests/java/nio/channels/DatagramChannelTest.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/java/org/apache/harmony/tests/java/nio/channels/DatagramChannelTest.java
Tue Jun 20 07:30:19 2006
@@ -1354,8 +1354,9 @@
         // not bound
         sendByChannel("some normal string in testReceiveSend_Normal",
                 localAddr2);
-        ByteBuffer buf = ByteBuffer.wrap(new byte[CAPACITY_NORMAL]);
-        assertNull((InetSocketAddress) this.channel1.receive(buf));
+        ByteBuffer buf = ByteBuffer.allocate(CAPACITY_NORMAL);
+        assertNull(channel1.receive(buf));
+        assertFalse(channel1.socket().isBound());
     }
 
     public void testReceiveSend_NonBlock_NotBound() throws Exception {



Mime
View raw message