Return-Path: Delivered-To: apmail-harmony-commits-archive@www.apache.org Received: (qmail 16461 invoked from network); 14 May 2009 12:49:10 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 14 May 2009 12:49:10 -0000 Received: (qmail 43023 invoked by uid 500); 14 May 2009 12:49:09 -0000 Delivered-To: apmail-harmony-commits-archive@harmony.apache.org Received: (qmail 42971 invoked by uid 500); 14 May 2009 12:49:09 -0000 Mailing-List: contact commits-help@harmony.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@harmony.apache.org Delivered-To: mailing list commits@harmony.apache.org Received: (qmail 42962 invoked by uid 99); 14 May 2009 12:49:09 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 14 May 2009 12:49:09 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 14 May 2009 12:49:06 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 94BF1234C004 for ; Thu, 14 May 2009 05:48:45 -0700 (PDT) Message-ID: <976282385.1242305325594.JavaMail.jira@brutus> Date: Thu, 14 May 2009 05:48:45 -0700 (PDT) From: "Sian January (JIRA)" To: commits@harmony.apache.org Subject: [jira] Commented: (HARMONY-6204) [classlib][luni] java.util.IdentityHashMap.(BigNumber) throws a NegativeArraySizeException while RI throws OutOfMemoryError In-Reply-To: <658134412.1242107145779.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ 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.(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.(IdentityHashMap.java:255) -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.