Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
Description
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
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