harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paulex Yang (JIRA)" <j...@apache.org>
Subject [jira] Closed: (HARMONY-894) [classlib][net] java.net.DatagramSocket(null).getBroadcast() returns different values for harmony vs RI
Date Thu, 28 Sep 2006 08:30:55 GMT
     [ http://issues.apache.org/jira/browse/HARMONY-894?page=all ]

Paulex Yang closed HARMONY-894.
-------------------------------


Verified by Vladimir.

> [classlib][net]  java.net.DatagramSocket(null).getBroadcast() returns different values
for harmony vs RI
> --------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-894
>                 URL: http://issues.apache.org/jira/browse/HARMONY-894
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Vladimir Ivanov
>         Assigned To: Paulex Yang
>         Attachments: 894.diff, DatagramSocket.patch
>
>
> The Harmony method DatagramSocket.getBroadcast() returns false while RI returns true.
> ================== test.java =====================
> import java.net.*;
> public class test  { 
>     public static void main (String[] args) {                     
>        try {                                                                        
                                                                               
>            System.out.println("getBroadcast()1 = " + new DatagramSocket().getBroadcast());
>        } catch (Exception e) {
>            e.printStackTrace();
>        }  
>        try {                                                                        
                                                                               
>            System.out.println("getBroadcast()2 = " + new DatagramSocket((SocketAddress)
null).getBroadcast());                                                                   
                                                                      
>        } catch (Exception e) {
>            e.printStackTrace();
>        }                   
>     }     
> }
> ==============================================
> Output:
> C:\tmp\tmp17>C:\jdk1.5.0_06\bin\java.exe -cp . -showversion test
> java version "1.5.0_06"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05)
> Java HotSpot(TM) Client VM (build 1.5.0_06-b05, mixed mode)
> getBroadcast()1 = true
> getBroadcast()2 = true
> C:\tmp\tmp17>C:\harmony\trunk_0427\deploy\jdk\jre\bin\java.exe -cp . -showversion
test
> java version 1.5 (subset)
> (c) Copyright 1991, 2006 The Apache Software Foundation or its licensors, as applicable.
> getBroadcast()1 = true
> getBroadcast()2 = false

-- 
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

        

Mime
View raw message