You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Sven Meier (JIRA)" <ji...@apache.org> on 2013/05/23 16:19:23 UTC

[jira] [Updated] (WICKET-5199) Component.getBehaviors(Class type) documentation is obsolete

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

Sven Meier updated WICKET-5199:
-------------------------------

    Issue Type: Improvement  (was: Bug)
    
> Component.getBehaviors(Class<M> type) documentation is obsolete
> ---------------------------------------------------------------
>
>                 Key: WICKET-5199
>                 URL: https://issues.apache.org/jira/browse/WICKET-5199
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>    Affects Versions: 6.8.0
>            Reporter: Ota Hauptmann
>            Priority: Trivial
>              Labels: documentation
>
> Current documentation sounds:
> 	/**
> 	 * Gets the subset of the currently coupled {@link Behavior}s that are of the provided type as a
> 	 * unmodifiable list. Returns an empty list rather than null if there are no behaviors coupled
> 	 * to this component.
> 	 * 
> 	 * @param type
> 	 *            The type or null for all
> 	 * @return The subset of the currently coupled behaviors that are of the provided type as a
> 	 *         unmodifiable list or null
> 	 * @param <M>
> 	 *            A class derived from IBehavior
> 	 */
> As you can see, the description is inconsistent with return doc. It should be "as an unmodifiable list" instead of "as a unmodifiable list or null", because Behaviors.getBehaviors(Class<M> type) never returns null. Please notice the typo as well ("a" vs. "an").
> Moreover, the <M> param doc speaks about IBehavior, which was dropped in 1.5 (which is a pity in my opinion, but that's another thing). There should be "Behavior" instead of "IBehavior".
> So the documentation should be:
> 	/**
> 	 * Gets the subset of the currently coupled {@link Behavior}s that are of the provided type as a
> 	 * unmodifiable list. Returns an empty list rather than null if there are no behaviors coupled
> 	 * to this component.
> 	 * 
> 	 * @param type
> 	 *            The type or null for all
> 	 * @return The subset of the currently coupled behaviors that are of the provided type as an
> 	 *         unmodifiable list
> 	 * @param <M>
> 	 *            A class derived from Behavior
> 	 */

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira