You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Michael Day (JIRA)" <ji...@apache.org> on 2016/05/16 02:12:12 UTC

[jira] [Updated] (WICKET-6166) JavaSerializer using CheckingObjectOutputStream fails in conjunction with PageSizeDebugPanel

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

Michael Day updated WICKET-6166:
--------------------------------
    Description: 
I've overridden JavaSerializer in the following way.  When my application is in development mode, the PageSizeDebugPanel attempts to serialize my components to calculate their size.  Unfortunately it does this before detach() has been called, so of course the NotDetachedModelChecker() fails.

{code}
JavaSerializer serializer = new JavaSerializer(getApplicationKey()) {
    @Override
    protected ObjectOutputStream newObjectOutputStream(OutputStream out) throws IOException {
        List<IObjectChecker> checkers = Lists.newArrayList(
                new NotDetachedModelChecker(),
                new ObjectSerializationChecker());
        return new CheckingObjectOutputStream(out, checkers.toArray(new IObjectChecker[checkers.size()]));
    }
};
{code}



  was:
I've overridden JavaSerializer in the following way.

{code}
JavaSerializer serializer = new JavaSerializer(getApplicationKey()) {
            @Override
            protected ObjectOutputStream newObjectOutputStream(OutputStream out) throws IOException {
                List<IObjectChecker> checkers = Lists.newArrayList(
                        new NotDetachedModelChecker(),
                        new ObjectSerializationChecker());

                return new CheckingObjectOutputStream(out, checkers.toArray(new IObjectChecker[checkers.size()]));
            }
        };
        getFrameworkSettings().setSerializer(serializer);
{code}

When my application is in development mode, the PageSizeDebugPanel attempts to serialize my components to calculate their size.  Unfortunately it does this before detach() has been called, so of course the NotDetachedModelChecker() fails.


> JavaSerializer using CheckingObjectOutputStream fails in conjunction with PageSizeDebugPanel
> --------------------------------------------------------------------------------------------
>
>                 Key: WICKET-6166
>                 URL: https://issues.apache.org/jira/browse/WICKET-6166
>             Project: Wicket
>          Issue Type: Bug
>    Affects Versions: 7.2.0
>            Reporter: Michael Day
>
> I've overridden JavaSerializer in the following way.  When my application is in development mode, the PageSizeDebugPanel attempts to serialize my components to calculate their size.  Unfortunately it does this before detach() has been called, so of course the NotDetachedModelChecker() fails.
> {code}
> JavaSerializer serializer = new JavaSerializer(getApplicationKey()) {
>     @Override
>     protected ObjectOutputStream newObjectOutputStream(OutputStream out) throws IOException {
>         List<IObjectChecker> checkers = Lists.newArrayList(
>                 new NotDetachedModelChecker(),
>                 new ObjectSerializationChecker());
>         return new CheckingObjectOutputStream(out, checkers.toArray(new IObjectChecker[checkers.size()]));
>     }
> };
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)