You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Roy van Rijn (JIRA)" <ji...@apache.org> on 2007/08/17 15:58:30 UTC

[jira] Updated: (WICKET-857) Method of forcing the use of transient

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

Roy van Rijn updated WICKET-857:
--------------------------------

    Attachment: added_tester_code

I attached the code I used in my project. Feel free to use it in Wicket.

> Method of forcing the use of transient
> --------------------------------------
>
>                 Key: WICKET-857
>                 URL: https://issues.apache.org/jira/browse/WICKET-857
>             Project: Wicket
>          Issue Type: New Feature
>          Components: wicket
>    Affects Versions: 1.3.0-beta2
>            Reporter: Roy van Rijn
>         Attachments: added_tester_code
>
>
> A common problem in Wicket is that people forget to put everything in the WebPage objects on 'transient'. This will cause memory-problems. In our current project I added a little bit of code to a testclass that extends the WicketTester that takes care of this problem.
> It works like this:
> When a page is loaded with the WicketTester is checks all the field the Page had. If the field implements the IModel interface its ok. If the field has transient its also fine. But if there are fields that have neither it will fail the test. This way programmers are forced to make the field transient.
> Because sometimes fields need to be serialized without being IModels I also added a @SkipSerializableCheck annotation.
> This forces programmers using Wicket to think about serialization and they have to add a annotation to make is serializable instead of adding transient to make it non-serializable.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.