You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Kevin Zhou (JIRA)" <ji...@apache.org> on 2009/05/12 07:27:45 UTC
[jira] Commented: (HARMONY-6203) [classlib][luni]
java.util.Hashtable.remove(.) throws StackOverflowError while RI doesn't
[ https://issues.apache.org/jira/browse/HARMONY-6203?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12708326#action_12708326 ]
Kevin Zhou commented on HARMONY-6203:
-------------------------------------
The below test case [1] shows that this also happens to the constructor of Hashtable.
[1] Test Case:
public void test_HashTable_Constructor() {
Hashtable hashTable = new Hashtable();
hashTable.put(hashTable, hashTable.keySet());
new Hashtable(hashTable);
}
> [classlib][luni] java.util.Hashtable.remove(.) throws StackOverflowError while RI doesn't
> -----------------------------------------------------------------------------------------
>
> Key: HARMONY-6203
> URL: https://issues.apache.org/jira/browse/HARMONY-6203
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Affects Versions: 5.0M9
> Reporter: Kevin Zhou
> Fix For: 5.0M10
>
> Original Estimate: 48h
> Remaining Estimate: 48h
>
> Given a test case below [1], RI passes it while HARMONY throws a java.lang.StackOverflowError error. The stack trace is given as [2], this error is thrown due to its hashCode method.
> [1] Test Case:
> public void test_HashTable_remove() {
> Hashtable hashTable = new Hashtable();
> Set keySet = hashTable.keySet();
> hashTable.put(hashTable, keySet);
> hashTable.remove(hashTable);
> }
> [2] Stack Trace:
> java.lang.StackOverflowError
> at java.util.Collections$SynchronizedCollection.iterator(Collections.java:449)
> at java.util.Hashtable.hashCode(Hashtable.java:541)
> at java.util.AbstractSet.hashCode(AbstractSet.java:79)
> at java.util.Collections$SynchronizedSet.hashCode(Collections.java:832)
> at java.util.Hashtable.hashCode(Hashtable.java:547)
> at java.util.AbstractSet.hashCode(AbstractSet.java:79)
> at java.util.Collections$SynchronizedSet.hashCode(Collections.java:832)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.