You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Hudson (JIRA)" <ji...@apache.org> on 2010/09/16 13:38:34 UTC

[jira] Commented: (WICKET-3049) CompoundPropertyModel constructor allows misuse of model object

    [ https://issues.apache.org/jira/browse/WICKET-3049?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12910105#action_12910105 ] 

Hudson commented on WICKET-3049:
--------------------------------

Integrated in Apache Wicket 1.5.x #331 (See [https://hudson.apache.org/hudson/job/Apache%20Wicket%201.5.x/331/])
    

> CompoundPropertyModel constructor allows misuse of model object
> ---------------------------------------------------------------
>
>                 Key: WICKET-3049
>                 URL: https://issues.apache.org/jira/browse/WICKET-3049
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>    Affects Versions: 1.4.12, 1.5-M2.1
>         Environment: all
>            Reporter: Ernesto Reinaldo Barreiro
>            Assignee: Peter Ertl
>            Priority: Trivial
>             Fix For: 1.5-M3
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> Right now the constructor of CompoundPropertyModel is as follows:
>        /**
>         * Constructor
>         *
>         * @param object
>         *            The model object, which may or may not implement IModel
>         */
>        public CompoundPropertyModel(final Object object)
>        {
>                target = object;
>        }
> which allows users to do something like:
> new CompoundPropertyModel<XXX>(new YYY());
> without generating a compiler error. Would it make sense to replace
> this constructor by two constructors...
>        /**
>         * Constructor
>         *
>         * @param object
>         *            The model object
>         */
>        public CompoundPropertyModel(final T object)
>        {
>                target = object;
>        }
>        /**
>         * Constructor
>         *
>         * @param object
>         *            an instance of IModel<T>
>         */
>        public CompoundPropertyModel(final IModel<T> object)
>        {
>                target = object;
>        }
> at least on 1.5?

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