commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 37711] - [resources] Messages Refactoring
Date Thu, 01 Dec 2005 00:30:03 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=37711>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=37711





------- Additional Comments From jmikus@gmail.com  2005-12-01 01:30 -------
(In reply to comment #0)
> 4) Only have one instance method that has an Object[] for arguments

I wanted to suggest this myself. Current interface, which is borrowed from
Struts, is hideous: one parameter, two, three, four... This is madness.
Especially considering that these parameters are converted to array afterwards.

>, but add 
> static convenience methods for turning arguments into an Object[].  Users could 
> then do something like the following:
> 
>  String msg = messages.getMessage(locale, "foo.bar", Messages.args
> ("first", "second"));

Please, don't do that. This only clutters the interface, with zero gain. The
above expression can be rewritten as 

  String msg = messages.getMessage(locale, "foo.bar", new String[] {"first",
"second"});

This is the only format I use in my Struts applications and I never had problems
with that. I don't see how instantiating a new array can be hard for a Java
programmer.


-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message