Return-Path: Delivered-To: apmail-incubator-harmony-commits-archive@www.apache.org Received: (qmail 70267 invoked from network); 1 Aug 2006 14:17:01 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 1 Aug 2006 14:17:01 -0000 Received: (qmail 16565 invoked by uid 500); 1 Aug 2006 14:16:51 -0000 Delivered-To: apmail-incubator-harmony-commits-archive@incubator.apache.org Received: (qmail 16499 invoked by uid 500); 1 Aug 2006 14:16:51 -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 16451 invoked by uid 99); 1 Aug 2006 14:16:50 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 01 Aug 2006 07:16:50 -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; Tue, 01 Aug 2006 07:16:50 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id E17ED410017 for ; Tue, 1 Aug 2006 14:14:13 +0000 (GMT) Message-ID: <3597691.1154441653921.JavaMail.jira@brutus> Date: Tue, 1 Aug 2006 07:14:13 -0700 (PDT) From: "Denis Kishenko (JIRA)" To: harmony-commits@incubator.apache.org Subject: [jira] Created: (HARMONY-1033) [classlib][lang]compatibility: expected IndexOutOfBoundsException for Character.codePointAt 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 [classlib][lang]compatibility: expected IndexOutOfBoundsException for Character.codePointAt -------------------------------------------------------------------------------------------- Key: HARMONY-1033 URL: http://issues.apache.org/jira/browse/HARMONY-1033 Project: Harmony Issue Type: Bug Components: Classlib Reporter: Denis Kishenko Specs 1.5 Methods throws NullPointerException - if a is null. IndexOutOfBoundsException - if offset or count is negative, or if offset + count is larger than the length of the given array. If first argument is null RI throws NPE only in the second test, it's strange, but we have to follow. public class bug9276 { public static void main (String[] args) { try { Character.codePointAt(null, 6, 4); System.err.println("failed 1"); } catch (IndexOutOfBoundsException e) { System.err.println("passed 1"); e.printStackTrace(); } catch (Exception e) { System.err.println("failed 1"); e.printStackTrace(); } try { Character.codePointAt(null, 4, 6); System.err.println("failed 2"); } catch (NullPointerException e) { System.err.println("passed 2"); e.printStackTrace(); } catch (Exception e) { System.err.println("failed 2"); e.printStackTrace(); } try { Character.codePointAt(null, 0, 0); System.err.println("failed 3"); } catch (IndexOutOfBoundsException e) { System.err.println("passed 3"); e.printStackTrace(); } catch (Exception e) { System.err.println("failed 3"); e.printStackTrace(); } } } Output RI -------------------------------------------------------------------- passed 1 java.lang.IndexOutOfBoundsException at java.lang.Character.codePointAt(Character.java:2400) at bug9276.main(bug9276.java:6) passed 2 java.lang.NullPointerException at java.lang.Character.codePointAt(Character.java:2399) at bug9276.main(bug9276.java:16) passed 3 java.lang.IndexOutOfBoundsException at java.lang.Character.codePointAt(Character.java:2400) at bug9276.main(bug9276.java:26) Harmony ----------------------------------------------------------- failed 1 java.lang.NullPointerException at java.lang.Character.codePointAt(Character.java:1918) at bug9276.main(bug9276.java:6) passed 2 java.lang.NullPointerException at java.lang.Character.codePointAt(Character.java:1918) at bug9276.main(bug9276.java:16) failed 3 java.lang.NullPointerException at java.lang.Character.codePointAt(Character.java:1918) at bug9276.main(bug9276.java:26) -- 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