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] Assigned: (HARMONY-6213) [classlib][beans] XMLDecoder.readObject() should not invoke org.xml.sax.SAXParseException
Date Tue, 16 Jun 2009 10:33:08 GMT

     [ https://issues.apache.org/jira/browse/HARMONY-6213?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Tim Ellison reassigned HARMONY-6213:
------------------------------------

    Assignee: Tim Ellison

> [classlib][beans] XMLDecoder.readObject() should not invoke org.xml.sax.SAXParseException
> -----------------------------------------------------------------------------------------
>
>                 Key: HARMONY-6213
>                 URL: https://issues.apache.org/jira/browse/HARMONY-6213
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>    Affects Versions: 5.0M9
>            Reporter: Kevin Zhou
>            Assignee: Tim Ellison
>         Attachments: HARMONY-6213.diff
>
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> Given a test case [1], RI passes it while HARMONY fails. 
> For HARMONY, it throws the following exceptions:
> org.xml.sax.SAXParseException: Premature end of file.
> Continue...
> org.xml.sax.SAXParseException: Premature end of file.
> Continue...
> org.xml.sax.SAXParseException: Premature end of file.
> Continue...
> org.xml.sax.SAXParseException: Premature end of file.
> Continue...
> [1] Test Case:
> public void test_readObject() throws Exception {
>         final Vector<Exception> exceptionList = new Vector<Exception>();
>         final ExceptionListener exceptionListener = new ExceptionListener() {
>             public void exceptionThrown(Exception e) {
>                 exceptionList.addElement(e);
>                 System.err.println(e + "\nContinue...");
>             }
>         };
>         String content = "<?xml version=\"1.0\" encoding=\"UTF-8\"?><java version=\"1.6.0_13\"
class=\"java.beans.XMLDecoder\"><int>1</int><int>2</int><int>3</int></java>";
>         XMLDecoder xmlDecoder = new XMLDecoder(new ByteArrayInputStream(content
>                 .getBytes("UTF-8")));
>         xmlDecoder.setExceptionListener(exceptionListener);
>         assertEquals(new Integer(1), xmlDecoder.readObject());
>         assertEquals(new Integer(2), xmlDecoder.readObject());
>         assertEquals(new Integer(3), xmlDecoder.readObject());
>         xmlDecoder.close();
>         assertEquals(0, exceptionList.size());
>     } 

-- 
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