[
https://issues.apache.org/jira/browse/WICKET-1445?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12581840#action_12581840
]
Johan Compagner commented on WICKET-1445:
-----------------------------------------
not really, we dont rape to much (if you dont look at the Wicket In and
OutputStreams :) )
That one is just one extra delegate so that we can exactly say what object and
what field is going wrong, because that is really lacking in OOS.
Maybe the construct isnt that nice instead of this:
final ObjectOutputStream oos = new ObjectOutputStream(out);
return new ObjectOutputStream()
{
protected void writeObjectOverride(final Object
obj) throws IOException
{
it should be this
return new ObjectOutputStream()
{
final ObjectOutputStream oos = new
ObjectOutputStream(out);
protected void writeObjectOverride(final Object
obj) throws IOException
Then it is much more clear that we just wrap 1 in another and then you also see
that we really need to flush and close the inner one because that is our state.
{
> StreamCorruptedException/PageStore/Serialization broken because
> ObjectOutputStream was not flushed
> --------------------------------------------------------------------------------------------------
>
> Key: WICKET-1445
> URL: https://issues.apache.org/jira/browse/WICKET-1445
> Project: Wicket
> Issue Type: Bug
> Components: wicket
> Affects Versions: 1.3.1, 1.3.2
> Reporter: Niclas Hedhman
> Assignee: Igor Vaynberg
> Fix For: 1.3.3
>
> Attachments: wicket-close-stream.patch
>
>
> The Objects.objectToByteArray() method incorrectly forgets to flush/close the
> ObjectOutputStream it uses. This can create corrupt object streams.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.