From commits-return-58638-apmail-harmony-commits-archive=harmony.apache.org@harmony.apache.org Wed Jun 03 01:34:19 2009 Return-Path: Delivered-To: apmail-harmony-commits-archive@www.apache.org Received: (qmail 96683 invoked from network); 3 Jun 2009 01:34:19 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 3 Jun 2009 01:34:19 -0000 Received: (qmail 45723 invoked by uid 500); 3 Jun 2009 01:34:30 -0000 Delivered-To: apmail-harmony-commits-archive@harmony.apache.org Received: (qmail 45644 invoked by uid 500); 3 Jun 2009 01:34:30 -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 45618 invoked by uid 99); 3 Jun 2009 01:34:30 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 03 Jun 2009 01:34:30 +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; Wed, 03 Jun 2009 01:34:28 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 4AB9C234C055 for ; Tue, 2 Jun 2009 18:34:08 -0700 (PDT) Message-ID: <1664231740.1243992848305.JavaMail.jira@brutus> Date: Tue, 2 Jun 2009 18:34:08 -0700 (PDT) From: "Nathan Beyer (JIRA)" To: commits@harmony.apache.org Subject: [jira] Updated: (HARMONY-6218) [classlib][lang-management] java.lang.management.MemoryUsage.from(CompositeData cd) should throw IlegalArgumentException but not NullPointerException In-Reply-To: <780602951.1243740007391.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-6218?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Nathan Beyer updated HARMONY-6218: ---------------------------------- Fix Version/s: (was: 5.0M10) > [classlib][lang-management] java.lang.management.MemoryUsage.from(CompositeData cd) should throw IlegalArgumentException but not NullPointerException > ----------------------------------------------------------------------------------------------------------------------------------------------------- > > Key: HARMONY-6218 > URL: https://issues.apache.org/jira/browse/HARMONY-6218 > Project: Harmony > Issue Type: Bug > Components: Classlib > Affects Versions: 5.0M9 > Reporter: Kevin Zhou > Attachments: HARMONY-6218.diff > > Original Estimate: 24h > Remaining Estimate: 24h > > Given a test case [1], RI passes it while HARMONY fails and throws a java.lang.NullPointerException. > According to Java Spec, if the argument cd does not represent a MemoryUsage with the attributes described below, it should throw a java.lang.IllegalArgumentException. > Attribute Name Type > init java.lang.Long > used java.lang.Long > committed java.lang.Long > max java.lang.Long > [1] Test Case: > public void test_from() throws Exception { > String[] names = { "init", "used", "committed" }; > Object[] values = { null, null, null }; > OpenType[] types = { SimpleType.LONG, SimpleType.LONG, SimpleType.LONG }; > CompositeType compositeType = getCompositeType(names, types); > CompositeData data = new CompositeDataSupport(compositeType, names, values); > try { > MemoryUsage.from(data); > fail("should throw IllegalArgumentException"); > } catch (IllegalArgumentException e) { > // Expected > } > } -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.