You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Kevin Zhou (JIRA)" <ji...@apache.org> on 2009/05/27 08:14:45 UTC

[jira] Updated: (HARMONY-6213) [classlib][beans] XMLDecoder.readObject() should not invoke org.xml.sax.SAXParseException

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

Kevin Zhou updated HARMONY-6213:
--------------------------------

    Fix Version/s: 5.0M10

> [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
>             Fix For: 5.0M10
>
>   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.