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/26 10:04:45 UTC
[jira] Closed: (HARMONY-6015) [classlib] [beans] Exceptions should
be thrown and handled in XMLDecoder.readObject() rather than XMLDecoder's
constructors
[ 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.