harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Regis <xu.re...@gmail.com>
Subject Re: svn commit: r832471 - /harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/InetAddress.java
Date Thu, 05 Nov 2009 08:51:20 GMT
Kevin Zhou wrote:
> Hi Regis,
> 
> I found that too. The errors are:
> 
> test_checkAcceptLjava_lang_String_int
> test_checkConnectLjava_lang_String_int_Ljava_lang_Object
> test_checkListen_int
> test_checkMulticastLjava_net_InetAddress
> test_checkMulticastLjava_net_InetAddress_int
> test_checkPermissionLjava_security_PermissionLjava_lang_Object
> 
> 
> On Thu, Nov 5, 2009 at 4:10 PM, Regis <xu.regis@gmail.com> wrote:
> 
>> tellison@apache.org wrote:
>>
>>> 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;
>>>
>>>
>>>
>>>
>> After this commit, I saw 6 tests errors in SecurityManagerTest:
>>
>> java.lang.StackOverflowError
>> at
>> java.util.ListResourceBundle.initializeTable(ListResourceBundle.java:123)
>> at
>> java.util.ListResourceBundle.handleGetObject(ListResourceBundle.java:115)
>> at java.util.ResourceBundle.getObject(ResourceBundle.java:278)
>> at
>> java.util.regex.AbstractCharClass.getPredefinedClass(AbstractCharClass.java:198)
>> at java.util.regex.Lexer.movePointer(Lexer.java:558)
>> at java.util.regex.Lexer.(Lexer.java:224)
>> at java.util.regex.Pattern.compileImpl(Pattern.java:334)
>> at java.util.regex.Pattern.compile(Pattern.java:319)
>> at java.util.regex.Pattern.compile(Pattern.java:1329)
>> at java.util.regex.Pattern.matches(Pattern.java:1366)
>> at java.lang.String.matches(String.java:1829)
>> at
>> org.apache.harmony.luni.util.Inet6Util.isValidIPV4Address(Inet6Util.java:481)
>> at java.net.InetAddress.isHostName(InetAddress.java:625)
>> at java.net.InetAddress.getHostNameInternal(InetAddress.java:514)
>> at java.net.SocketPermission.getIPString(SocketPermission.java:385)
>> at java.net.SocketPermission.checkHost(SocketPermission.java:486)
>> at
>> java.net.SocketPermissionCollection.implies(SocketPermissionCollection.java:75)
>> at java.security.Permissions.implies(Permissions.java:204)
>> at
>> org.apache.harmony.luni.tests.java.lang.MutableSecurityManager.checkPermission(MutableSecurityManager.java:62)
>> at java.lang.SecurityManager.checkConnect(SecurityManager.java:165)
>> at java.net.InetAddress.getHostNameInternal(InetAddress.java:517)
>> at java.net.SocketPermission.getIPString(SocketPermission.java:385)
>> at java.net.SocketPermission.checkHost(SocketPermission.java:486)
>> at
>> java.net.SocketPermissionCollection.implies(SocketPermissionCollection.java:75)
>> at java.security.Permissions.implies(Permissions.java:204)
>> at
>> org.apache.harmony.luni.tests.java.lang.MutableSecurityManager.checkPermission(MutableSecurityManager.java:62)
>> at java.lang.SecurityManager.checkConnect(SecurityManager.java:165)
>> at java.net.InetAddress.getHostNameInternal(InetAddress.java:517)
>> .....
>>
>> is there anyone has the same problem?
>>
>> --
>> Best Regards,
>> Regis.
>>
> 
> 
> 

A quick fix applied at r833022, the test should be passed now.

-- 
Best Regards,
Regis.

Mime
View raw message