harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tim Ellison (JIRA)" <j...@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
Date Wed, 22 Apr 2009 13:17:47 GMT

    [ https://issues.apache.org/jira/browse/HARMONY-6162?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12701522#action_12701522
] 

Tim Ellison commented on HARMONY-6162:
--------------------------------------

FYI  this looks remarkably like the patch I just applied for HARMONY-6165.


> [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: fix.diff, format.diff, HARMONY-6162.diff, HARMONY-6162v2.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.


Mime
View raw message