[
https://issues.apache.org/jira/browse/OFBIZ-4427?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13190805#comment-13190805
]
Jacques Le Roux commented on OFBIZ-4427:
----------------------------------------
Hi Paul,
Coincidentally, I was working on the style of last OFBIZ-4580 patch. I wanted
to fix/improve the way the error is returned/logged when GenericEntityException
is catched there. For that I wanted to use something like
{code}
String errMsg = UtilProperties.getMessage("CommonUiLabels",
"CommonDatabaseProblem", messageMap, (Locale) context.get("locale"));
{code}
I found 2 issues I'm working on:
# CommonDatabaseProblem does not receive an errMessage parameter thought it's
used as is OOTB, which is unrelated to our issue
# Looking into <<public static String getMessage(String resource, String name,
Object[] arguments, Locale locale)>> I wanted to use
UtilValidate.isEmpty(arguments) in/instead of <<if (arguments != null &&
arguments.length > 0) {>> and then remembered your proposition. I think it's a
good idea, and would appreciate a patch
Thanks for your help
> Possible runtime errors with UtilValidate.isEmpty(Object) should be rather
> caught during compilation
> ----------------------------------------------------------------------------------------------------
>
> Key: OFBIZ-4427
> URL: https://issues.apache.org/jira/browse/OFBIZ-4427
> Project: OFBiz
> Issue Type: Improvement
> Components: framework
> Affects Versions: SVN trunk
> Reporter: Jacques Le Roux
> Priority: Minor
> Labels: UtilValidate.isEmpty
> Fix For: SVN trunk
>
> Attachments: OFBIZ-4427.patch
>
>
> Hence we need tp remove the UtilValidate.isEmpty(Object) method and provide
> methods that accept explicit types.
> Scripting languages should use a facade class that provides methods for
> working with generic Objects or providing default behaviors.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira