Return-Path: Delivered-To: apmail-incubator-harmony-commits-archive@www.apache.org Received: (qmail 53000 invoked from network); 12 Jul 2006 14:59:37 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 12 Jul 2006 14:59:37 -0000 Received: (qmail 88415 invoked by uid 500); 12 Jul 2006 14:59:33 -0000 Delivered-To: apmail-incubator-harmony-commits-archive@incubator.apache.org Received: (qmail 88389 invoked by uid 500); 12 Jul 2006 14:59:33 -0000 Mailing-List: contact harmony-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: harmony-dev@incubator.apache.org Delivered-To: mailing list harmony-commits@incubator.apache.org Received: (qmail 88360 invoked by uid 99); 12 Jul 2006 14:59:33 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 12 Jul 2006 07:59:33 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [209.237.227.198] (HELO brutus.apache.org) (209.237.227.198) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 12 Jul 2006 07:59:32 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 07FDB4104EF for ; Wed, 12 Jul 2006 14:57:34 +0000 (GMT) Message-ID: <30916047.1152716254029.JavaMail.jira@brutus> Date: Wed, 12 Jul 2006 14:57:34 +0000 (GMT+00:00) From: "Anton Luht (JIRA)" To: harmony-commits@incubator.apache.org Subject: [jira] Updated: (HARMONY-855) Some java.uiti.Collections methods do not throw unspecified NPE while RI does In-Reply-To: <30345533.1152716249809.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N [ http://issues.apache.org/jira/browse/HARMONY-855?page=all ] Anton Luht updated HARMONY-855: ------------------------------- Attachment: patch.txt patch > Some java.uiti.Collections methods do not throw unspecified NPE while RI does > ----------------------------------------------------------------------------- > > Key: HARMONY-855 > URL: http://issues.apache.org/jira/browse/HARMONY-855 > Project: Harmony > Type: Bug > Components: Non-bug differences from RI > Environment: Windows XP professional > Reporter: Anton Luht > Priority: Minor > Attachments: patch.txt > > Build: classlib+VM revision 421248 msvc debug > Problem: > Some Collections.checked... methods throw NPE if one of their arguments is null in RI but don't throw in Harmony > Code to reproduce: > import java.util.*; > public class Test { > public static void main (String[] args) { > try { > Collections.checkedSortedMap(new TreeMap(), null, Short.TYPE); > System.err.println("fail 1"); > } catch (NullPointerException e) { > } > try { > Collections.checkedSortedMap(new TreeMap(), Float.TYPE, null); > System.err.println("fail 1.1"); > } catch (NullPointerException e) { > } > try { > Collections.checkedMap(new TreeMap(), null, Float.TYPE); > System.err.println("fail 2"); > } catch (NullPointerException e) { > } > try { > Collections.checkedMap(new TreeMap(), Float.TYPE, null); > System.err.println("fail 2.2"); > } catch (NullPointerException e) { > } > try { > Collections.checkedCollection(new Stack(), null); > System.err.println("fail 3"); > } catch (NullPointerException e) { > } > } > } > in RI this test prints nothing, in Harmony all 'fail' messages are printed > Please see the patch attached. It contains: > - JUnit test for the problem > - patch for java.util.Collections -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira