Return-Path: Delivered-To: apmail-harmony-commits-archive@www.apache.org Received: (qmail 89639 invoked from network); 21 Apr 2009 10:01:09 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 21 Apr 2009 10:01:09 -0000 Received: (qmail 837 invoked by uid 500); 21 Apr 2009 10:01:09 -0000 Delivered-To: apmail-harmony-commits-archive@harmony.apache.org Received: (qmail 771 invoked by uid 500); 21 Apr 2009 10:01: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 762 invoked by uid 99); 21 Apr 2009 10:01:09 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 21 Apr 2009 10:01: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; Tue, 21 Apr 2009 10:01:08 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id D3F7C234C003 for ; Tue, 21 Apr 2009 03:00:47 -0700 (PDT) Message-ID: <125765511.1240308047856.JavaMail.jira@brutus> Date: Tue, 21 Apr 2009 03:00:47 -0700 (PDT) From: "Regis Xu (JIRA)" To: commits@harmony.apache.org Subject: [jira] Commented: (HARMONY-6162) [classlib][luni][java6] java.util.Properties#load(java.io.InputStream) should throw IllegalArgumentException if the given InputStream contains an Invalid Unicode sequence In-Reply-To: <2069384350.1240293107975.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-6162?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12701124#action_12701124 ] Regis Xu commented on HARMONY-6162: ----------------------------------- It seems some refactor can also apply to java5, I think it's better apply them to trunk directly, will save merge work in future. > [classlib][luni][java6] java.util.Properties#load(java.io.InputStream) should throw IllegalArgumentException if the given InputStream contains an Invalid Unicode sequence > -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- > > Key: HARMONY-6162 > URL: https://issues.apache.org/jira/browse/HARMONY-6162 > Project: Harmony > Issue Type: Bug > Components: Classlib > Affects Versions: 5.0M9 > Reporter: Kevin Zhou > Assignee: Regis Xu > Fix For: 5.0M10 > > Attachments: HARMONY-6162.diff > > > Given a test case [1], RI passes while HY fails. > The input stream contains "a=\\u123" where \\u123 is regarded as an Unicode escape but it doesn't follows the expected format: \\uxxxx. > It should contains 4 hex digits. Thus, it should throw a java.lang.IllegalArgumentException. > [1] Test Case: > public void test_Properties_loadLjava_io_InputStream() { > Properties prop = new Properties(); > try { > prop.load(new ByteArrayInputStream("a=\\u123".getBytes())); > 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.