harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kevin Zhou (JIRA)" <j...@apache.org>
Subject [jira] Closed: (HARMONY-6015) [classlib] [beans] Exceptions should be thrown and handled in XMLDecoder.readObject() rather than XMLDecoder's constructors
Date Tue, 26 May 2009 08:04:45 GMT

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

Kevin Zhou closed HARMONY-6015.
-------------------------------

    Estimated Complexity: Moderate  (was: Novice)

>  [classlib] [beans] Exceptions should be thrown and handled in XMLDecoder.readObject()
rather than XMLDecoder's constructors
> ----------------------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-6015
>                 URL: https://issues.apache.org/jira/browse/HARMONY-6015
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>    Affects Versions: 5.0M7
>            Reporter: Kevin Zhou
>            Assignee: Sean Qiu
>             Fix For: 5.0M9
>
>         Attachments: HARMONY-6015.diff
>
>   Original Estimate: 48h
>  Remaining Estimate: 48h
>
> Given a test scenario [1], conduct it on RI and HY.
> RI works well while HY fails.
> This test case illuminates that RI doesn't parse the content of given InputStream in
XMLDecoder's constructions, which should be handled in its readObject method.
> I think that we should follow RI's behaviors on this.
> [1]
> public void test_setExceptionListener() throws Exception {
> class MockExceptionListener implements ExceptionListener {
> private boolean isCalled;
> public void exceptionThrown(Exception e) { isCalled = true; }
> public boolean isCalled() { return isCalled; }
> }
> XMLDecoder xmlDecoder = new XMLDecoder(new ByteArrayInputStream(
> "<java><string/>".getBytes("UTF-8")));
> MockExceptionListener mockListener = new MockExceptionListener();
> xmlDecoder.setExceptionListener(mockListener);
> assertNotNull(xmlDecoder.readObject());
> assertTrue(mockListener.isCalled());
> }

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