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

[jira] Commented: (WICKET-2986) Feedback messages should be String not Serializable.

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

Martin Grigorov commented on WICKET-2986:
-----------------------------------------

@devs: Shall we touch the signature of all other methods to have Serializable parameter instead of String like FeedbackMessages#error() ?
org.apache.wicket.feedback.FeedbackMessage.message is already Serializable and it seems safe to change it without any changes needed in the user application code.

> Feedback messages should be String not Serializable.
> ----------------------------------------------------
>
>                 Key: WICKET-2986
>                 URL: https://issues.apache.org/jira/browse/WICKET-2986
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>    Affects Versions: 1.4.10
>            Reporter: Maarten Billemont
>            Priority: Minor
>
> Component#error currently accepts a Serializable as message parameter.  This is inconsistent with #info, #fatal and #warn.  What's more, Serializable is a really bad idea, because a message should always be a String, not a random object that can be toString'ed.
> toString is really bad practice for generating messages for user consumption.
> 1. It (generally) bleeds implementation details.
> 2. It (generally) isn't localized and often impossible to localize.
> That also means FeedbackMessage#message should be a String and not a Serializable, for the exact same reasons.

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