harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sian January (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HARMONY-6204) [classlib][luni] java.util.IdentityHashMap.<init>(BigNumber) throws a NegativeArraySizeException while RI throws OutOfMemoryError
Date Thu, 14 May 2009 12:48:45 GMT

    [ https://issues.apache.org/jira/browse/HARMONY-6204?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12709382#action_12709382
] 

Sian January commented on HARMONY-6204:
---------------------------------------

Hi Kevin,  I think the patch looks fine, but it would be good to have a comment in IdentityHashMap.computeElementArraySize
about why the value might be negative and why you're changing it to a positive one because
otherwise I think the code looks slightly strange.  Would you mind adding a comment and resubmitting
the patch?

> [classlib][luni] java.util.IdentityHashMap.<init>(BigNumber) throws a NegativeArraySizeException
while RI throws OutOfMemoryError
> ---------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-6204
>                 URL: https://issues.apache.org/jira/browse/HARMONY-6204
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>    Affects Versions: 5.0M9
>            Reporter: Kevin Zhou
>             Fix For: 5.0M10
>
>         Attachments: HARMONY-6204.diff
>
>   Original Estimate: 48h
>  Remaining Estimate: 48h
>
> Initialize an IdentityHashMap object using a given big integer as [1], HARMONY throws
a java.lang.NegativeArraySizeException while RI throws a java.lang.OutOfMemoryError. 
> [1] Test Case
> public void test_IdentityHashMap_Constructor_BigSize() {
>     new IdentityHashMap(1470164594);
> }
> [2] Stack Trace:
> java.lang.NegativeArraySizeException
> 	at java.util.IdentityHashMap.newElementArray(IdentityHashMap.java:279)
> 	at java.util.IdentityHashMap.<init>(IdentityHashMap.java:255)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message