Return-Path: Delivered-To: apmail-harmony-commits-archive@www.apache.org Received: (qmail 62004 invoked from network); 5 Jan 2007 05:58:58 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 5 Jan 2007 05:58:58 -0000 Received: (qmail 83583 invoked by uid 500); 5 Jan 2007 05:59:04 -0000 Delivered-To: apmail-harmony-commits-archive@harmony.apache.org Received: (qmail 83482 invoked by uid 500); 5 Jan 2007 05:59:04 -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 83473 invoked by uid 99); 5 Jan 2007 05:59:04 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 04 Jan 2007 21:59:04 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 04 Jan 2007 21:58:48 -0800 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id EA4C341002E for ; Thu, 4 Jan 2007 21:58:27 -0800 (PST) Message-ID: <6761435.1167976707955.JavaMail.jira@brutus> Date: Thu, 4 Jan 2007 21:58:27 -0800 (PST) From: "Tony Wu (JIRA)" To: commits@harmony.apache.org Subject: [jira] Updated: (HARMONY-2941) [classlib][luni]No exception was thrown when parseURL with limit = Integer.MIN_VALUE In-Reply-To: <4222180.1167974187522.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 [ https://issues.apache.org/jira/browse/HARMONY-2941?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Tony Wu updated HARMONY-2941: ----------------------------- Attachment: harmony-2941.diff > [classlib][luni]No exception was thrown when parseURL with limit = Integer.MIN_VALUE > ------------------------------------------------------------------------------------ > > Key: HARMONY-2941 > URL: https://issues.apache.org/jira/browse/HARMONY-2941 > Project: Harmony > Issue Type: Bug > Components: Classlib > Reporter: Tony Wu > Attachments: harmony-2941.diff > > > RI throws exception in following testcase whereas harmony return silently > public class URLStreamHandlerTest extends TestCase > static class MyURLStreamHandler extends URLStreamHandler { > @Override > protected URLConnection openConnection(URL arg0) throws IOException { > return null; > } > public void parse(URL url, String spec, int start, int end) { > parseURL(url, spec, start, end); > } > } > static class MyURLStreamHandlerFactory implements URLStreamHandlerFactory { > public static MyURLStreamHandler handler = new MyURLStreamHandler(); > public URLStreamHandler createURLStreamHandler(String arg0) { > handler = new MyURLStreamHandler(); > return handler; > } > } > public void test_parseURL() throws MalformedURLException { > URL.setURLStreamHandlerFactory(new MyURLStreamHandlerFactory()); > URL url = new URL("http://localhost"); > MyURLStreamHandler handler = MyURLStreamHandlerFactory.handler; > try { > handler.parse(url, "//", 0, Integer.MIN_VALUE); > fail("Should throw SIOOBE."); > } catch (StringIndexOutOfBoundsException e) { > // expected; > } > } > } -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira