You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Ernesto Reinaldo Barreiro (JIRA)" <ji...@apache.org> on 2010/09/15 20:27:33 UTC

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

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.5-M2.1, 1.4.12
         Environment: all
            Reporter: Ernesto Reinaldo Barreiro
            Priority: Trivial


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.


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

Posted by "Hudson (JIRA)" <ji...@apache.org>.
    [ 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.


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

Posted by "Peter Ertl (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-3049?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Peter Ertl resolved WICKET-3049.
--------------------------------

         Assignee: Peter Ertl
    Fix Version/s: 1.5-M2.1
       Resolution: Fixed

fixed for 1.5 (for 1.4 this would break the API)

> 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-M2.1
>
>   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.


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

Posted by "Martin Grigorov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-3049?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Martin Grigorov updated WICKET-3049:
------------------------------------

    Fix Version/s: 1.5-M3
                       (was: 1.5-M2.1)

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