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:11:12 UTC

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

Michael Day created WICKET-6166:
-----------------------------------

             Summary: 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.

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



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