You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Martin Grigorov (Resolved) (JIRA)" <ji...@apache.org> on 2012/03/19 14:55:37 UTC

[jira] [Resolved] (WICKET-4461) Make all Session methods which deal with attributes public

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

Martin Grigorov resolved WICKET-4461.
-------------------------------------

    Resolution: Fixed
    
> Make all Session methods which deal with attributes public
> ----------------------------------------------------------
>
>                 Key: WICKET-4461
>                 URL: https://issues.apache.org/jira/browse/WICKET-4461
>             Project: Wicket
>          Issue Type: Task
>          Components: wicket
>    Affects Versions: 1.5.5
>            Reporter: Martin Grigorov
>            Assignee: Martin Grigorov
>            Priority: Minor
>             Fix For: 6.0.0
>
>
> Session#setAttribute() and Session#getAttribute() were made public for 1.5 but #removeAttribute() and #getAttributeNames() left "protected final".
> I guess the idea to be 'protected' in first place was to force the developer to use Session field because it is type safe in contrast to Object values in the attributes. But since Java doesn't support "friend visibility" it is not possible to change set/get() back to protected unless moving classes around which is proved to be more problematic.
> The easier and less harmless solution is to make all of them 'public'. If the user decides to use attributes for some reason then he can use all the methods, not just half of them.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira