You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Juergen Donnerstag (JIRA)" <ji...@apache.org> on 2009/10/17 13:21:31 UTC

[jira] Resolved: (WICKET-2520) Use of Object instead of generic T in StringAutoCompleteRenderer

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

Juergen Donnerstag resolved WICKET-2520.
----------------------------------------

       Resolution: Fixed
    Fix Version/s: 1.5-M1
                   1.4.3
         Assignee: Juergen Donnerstag

Updated javadoc. 

> Use of Object instead of generic T in StringAutoCompleteRenderer
> ----------------------------------------------------------------
>
>                 Key: WICKET-2520
>                 URL: https://issues.apache.org/jira/browse/WICKET-2520
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket-extensions
>    Affects Versions: 1.4.2
>         Environment: N/A
>            Reporter: Keith R. Bennett
>            Assignee: Juergen Donnerstag
>            Priority: Minor
>             Fix For: 1.4.3, 1.5-M1
>
>   Original Estimate: 0.25h
>  Remaining Estimate: 0.25h
>
> The method getTextValue is defined in org.apache.wicket.extensions.ajax.markup.html.autocomplete.AbstractAutoCompleteRenderer as:
> 	protected abstract String getTextValue(T object);
> ...but overridden in StringAutoCompleteRenderer as:
> 	 // @see AbstractAutoCompleteTextRenderer#getTextValue(Object)
> 	protected String getTextValue(Object object)
> 	{
> 		return object.toString();
> 	}
> The Javadoc implies that the intention is to override the superclass' method. I think the parameter type should be changed from Object to T.
> I recommend that when using something like T, to name the parameter 'value' rather than 'object'.  'object' is misleading, as, by convention, it implies that its data type is Object.

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