You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Andrew Zhang (JIRA)" <ji...@apache.org> on 2006/06/19 09:22:30 UTC

[jira] Updated: (HARMONY-616) Remove one FIXME from "receive(ByteBuffer)" method of org.apache.harmony.nio.internal.DatagramChannelImpl class.

     [ http://issues.apache.org/jira/browse/HARMONY-616?page=all ]

Andrew Zhang updated HARMONY-616:
---------------------------------

    Attachment: harmony-616.diff

Hello,

Would you please try my patch? Thanks!

> Remove one FIXME from "receive(ByteBuffer)" method of org.apache.harmony.nio.internal.DatagramChannelImpl class.
> ----------------------------------------------------------------------------------------------------------------
>
>          Key: HARMONY-616
>          URL: http://issues.apache.org/jira/browse/HARMONY-616
>      Project: Harmony
>         Type: Improvement

>   Components: Classlib
>     Reporter: Andrew Zhang
>     Priority: Minor
>  Attachments: harmony-616.diff
>
> If a DatagramSocket is unbound, receive(ByteBuffer) should return immediately, and the socket status remains unbound. Currently Harmony implementation is correct. I'll upload a patch to remove this FIXME and update corresponding test. Thanks.
> the FIXME in receive method:
>       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;
>         }

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira