You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Richard Emberson (JIRA)" <ji...@apache.org> on 2010/12/18 01:14:01 UTC

[jira] Created: (WICKET-3265) Component data_remove returns Object which is never used

Component data_remove returns Object which is never used
--------------------------------------------------------

                 Key: WICKET-3265
                 URL: https://issues.apache.org/jira/browse/WICKET-3265
             Project: Wicket
          Issue Type: Improvement
          Components: wicket
    Affects Versions: 1.5-M3
         Environment: All
            Reporter: Richard Emberson
            Priority: Trivial


The Component method data_remove has the signature:
private Object data_remove(int position)
It returns an Object and it is private.
Only three places call data_remove in Component and none of them use
the return value.
Simplify the code in data_remove so that it does not return the data
being removed.
At some future time, one can always call data_get if one really needs the 
value prior to removing it.

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


[jira] Commented: (WICKET-3265) Component data_remove returns Object which is never used

Posted by "Igor Vaynberg (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-3265?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12972751#action_12972751 ] 

Igor Vaynberg commented on WICKET-3265:
---------------------------------------

bleh. i wouldve left it as it is. it didnt hurt anything. i never use the boolean returned from collection.remove, but its still there for the rare case i would need it.

> Component data_remove returns Object which is never used
> --------------------------------------------------------
>
>                 Key: WICKET-3265
>                 URL: https://issues.apache.org/jira/browse/WICKET-3265
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>    Affects Versions: 1.5-M3
>         Environment: All
>            Reporter: Richard Emberson
>            Assignee: Jeremy Thomerson
>            Priority: Trivial
>             Fix For: 1.4.15, 1.5-M4
>
>
> The Component method data_remove has the signature:
> private Object data_remove(int position)
> It returns an Object and it is private.
> Only three places call data_remove in Component and none of them use
> the return value.
> Simplify the code in data_remove so that it does not return the data
> being removed.
> At some future time, one can always call data_get if one really needs the 
> value prior to removing it.

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


[jira] Resolved: (WICKET-3265) Component data_remove returns Object which is never used

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

Jeremy Thomerson resolved WICKET-3265.
--------------------------------------

       Resolution: Fixed
    Fix Version/s: 1.5-M4
                   1.4.15

good observation.  thanks

> Component data_remove returns Object which is never used
> --------------------------------------------------------
>
>                 Key: WICKET-3265
>                 URL: https://issues.apache.org/jira/browse/WICKET-3265
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>    Affects Versions: 1.5-M3
>         Environment: All
>            Reporter: Richard Emberson
>            Assignee: Jeremy Thomerson
>            Priority: Trivial
>             Fix For: 1.4.15, 1.5-M4
>
>
> The Component method data_remove has the signature:
> private Object data_remove(int position)
> It returns an Object and it is private.
> Only three places call data_remove in Component and none of them use
> the return value.
> Simplify the code in data_remove so that it does not return the data
> being removed.
> At some future time, one can always call data_get if one really needs the 
> value prior to removing it.

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


[jira] Commented: (WICKET-3265) Component data_remove returns Object which is never used

Posted by "Richard Emberson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-3265?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12972913#action_12972913 ] 

Richard Emberson commented on WICKET-3265:
------------------------------------------

The reason I wanted to change what was returned by some of the methods
had to do with https://issues.apache.org/jira/browse/WICKET-3273


> Component data_remove returns Object which is never used
> --------------------------------------------------------
>
>                 Key: WICKET-3265
>                 URL: https://issues.apache.org/jira/browse/WICKET-3265
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>    Affects Versions: 1.5-M3
>         Environment: All
>            Reporter: Richard Emberson
>            Assignee: Jeremy Thomerson
>            Priority: Trivial
>             Fix For: 1.4.15, 1.5-M4
>
>
> The Component method data_remove has the signature:
> private Object data_remove(int position)
> It returns an Object and it is private.
> Only three places call data_remove in Component and none of them use
> the return value.
> Simplify the code in data_remove so that it does not return the data
> being removed.
> At some future time, one can always call data_get if one really needs the 
> value prior to removing it.

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


[jira] Commented: (WICKET-3265) Component data_remove returns Object which is never used

Posted by "Richard Emberson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-3265?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12972709#action_12972709 ] 

Richard Emberson commented on WICKET-3265:
------------------------------------------

BTW, data_set with signature:
private final Object data_set(int index, Object object)
is used twice in Component and in neither place is the old
value returned by data_set used.
So, this method can also be simplified by not returning
the old value.

> Component data_remove returns Object which is never used
> --------------------------------------------------------
>
>                 Key: WICKET-3265
>                 URL: https://issues.apache.org/jira/browse/WICKET-3265
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>    Affects Versions: 1.5-M3
>         Environment: All
>            Reporter: Richard Emberson
>            Priority: Trivial
>
> The Component method data_remove has the signature:
> private Object data_remove(int position)
> It returns an Object and it is private.
> Only three places call data_remove in Component and none of them use
> the return value.
> Simplify the code in data_remove so that it does not return the data
> being removed.
> At some future time, one can always call data_get if one really needs the 
> value prior to removing it.

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


[jira] Commented: (WICKET-3265) Component data_remove returns Object which is never used

Posted by "Hudson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-3265?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12972731#action_12972731 ] 

Hudson commented on WICKET-3265:
--------------------------------

Integrated in Apache Wicket 1.4.x #340 (See [https://hudson.apache.org/hudson/job/Apache%20Wicket%201.4.x/340/])
    fixes WICKET-3265 for 1.4.x branch


> Component data_remove returns Object which is never used
> --------------------------------------------------------
>
>                 Key: WICKET-3265
>                 URL: https://issues.apache.org/jira/browse/WICKET-3265
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>    Affects Versions: 1.5-M3
>         Environment: All
>            Reporter: Richard Emberson
>            Assignee: Jeremy Thomerson
>            Priority: Trivial
>             Fix For: 1.4.15, 1.5-M4
>
>
> The Component method data_remove has the signature:
> private Object data_remove(int position)
> It returns an Object and it is private.
> Only three places call data_remove in Component and none of them use
> the return value.
> Simplify the code in data_remove so that it does not return the data
> being removed.
> At some future time, one can always call data_get if one really needs the 
> value prior to removing it.

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


[jira] Assigned: (WICKET-3265) Component data_remove returns Object which is never used

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

Jeremy Thomerson reassigned WICKET-3265:
----------------------------------------

    Assignee: Jeremy Thomerson

> Component data_remove returns Object which is never used
> --------------------------------------------------------
>
>                 Key: WICKET-3265
>                 URL: https://issues.apache.org/jira/browse/WICKET-3265
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>    Affects Versions: 1.5-M3
>         Environment: All
>            Reporter: Richard Emberson
>            Assignee: Jeremy Thomerson
>            Priority: Trivial
>             Fix For: 1.4.15, 1.5-M4
>
>
> The Component method data_remove has the signature:
> private Object data_remove(int position)
> It returns an Object and it is private.
> Only three places call data_remove in Component and none of them use
> the return value.
> Simplify the code in data_remove so that it does not return the data
> being removed.
> At some future time, one can always call data_get if one really needs the 
> value prior to removing it.

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