harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From telli...@apache.org
Subject svn commit: r832471 - /harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/InetAddress.java
Date Tue, 03 Nov 2009 16:47:10 GMT
Author: tellison
Date: Tue Nov  3 16:47:09 2009
New Revision: 832471

URL: http://svn.apache.org/viewvc?rev=832471&view=rev
Log:
Part of HARMONY-6367 ([classlib] Some Methods doesn't have security Permissions check as compared
to SUN JDK)
Ensure that there is a checkConnect test during SocketPermission#equals(Object)

Modified:
    harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/InetAddress.java

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/InetAddress.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/InetAddress.java?rev=832471&r1=832470&r2=832471&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/InetAddress.java (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/InetAddress.java Tue
Nov  3 16:47:09 2009
@@ -512,6 +512,10 @@
             return InetAddress.LOOPBACK.getHostAddress();
         }
         if (isHostName(host)) {
+            SecurityManager sm = System.getSecurityManager();
+            if (sm != null) {
+                sm.checkConnect(host, -1);
+            }
             return lookupHostByName(host).getHostAddress();
         }
         return host;



Mime
View raw message