harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From telli...@apache.org
Subject svn commit: r492985 - in /harmony/enhanced/classlib/trunk/modules/luni/src: main/java/org/apache/harmony/luni/net/PlainSocketImpl.java test/java/tests/api/java/net/SocketTest.java
Date Fri, 05 Jan 2007 11:20:13 GMT
Author: tellison
Date: Fri Jan  5 03:20:12 2007
New Revision: 492985

URL: http://svn.apache.org/viewvc?view=rev&rev=492985
Log:
Apply patch HARMONY-2942 ([classlib][luni]UDP socket is not able to send package to 0.0.0.0)

Modified:
    harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/net/PlainSocketImpl.java
    harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/net/SocketTest.java

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/net/PlainSocketImpl.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/net/PlainSocketImpl.java?view=diff&rev=492985&r1=492984&r2=492985
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/net/PlainSocketImpl.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/net/PlainSocketImpl.java
Fri Jan  5 03:20:12 2007
@@ -232,7 +232,7 @@
             throw new ConnectException(anAddr + ":" + aPort + " - "
                     + e.getMessage());
         }
-        super.address = anAddr;
+        super.address = address;
         super.port = aPort;
     }
 

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/net/SocketTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/net/SocketTest.java?view=diff&rev=492985&r1=492984&r2=492985
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/net/SocketTest.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/net/SocketTest.java
Fri Jan  5 03:20:12 2007
@@ -458,7 +458,8 @@
 	/**
 	 * @tests java.net.Socket#getOutputStream()
 	 */
-	public void test_getOutputStream() throws IOException {
+	@SuppressWarnings("deprecation")
+    public void test_getOutputStream() throws IOException {
 		// Test for method java.io.OutputStream
 		// java.net.Socket.getOutputStream()
 		int sport = startServer("SServer getOutputStream");
@@ -522,6 +523,11 @@
         // Regression test for harmony-2934
         s = new Socket("127.0.0.1", 0, false);
         OutputStream o = s.getOutputStream();
+        o.write(1);
+
+        // Regression test for harmony-2942
+        s = new Socket("0.0.0.0", 0, false);
+        o = s.getOutputStream();
         o.write(1);
 	}
 



Mime
View raw message