[
https://issues.apache.org/jira/browse/OFBIZ-11281?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16974979#comment-16974979 ]
Ulrich Heidfeld commented on OFBIZ-11281:
-----------------------------------------
Hello [~mthl],
thanks for your teaching words.
In our project, we are using something like:
StringUtil.strToMap(UtilProperties.getPropertyValue(...))
If there is no according property value, an empty string will be returned.
I would prefer null instead of Collections.emptyMap as return value because we don't need to initiate a map if it has no informations in it. In addition, if a date time isn't set in properties, an empty value could be take as wrong date.
> Possible Nullpointer in StringUtil#strToMap
> -------------------------------------------
>
> Key: OFBIZ-11281
> URL:
https://issues.apache.org/jira/browse/OFBIZ-11281> Project: OFBiz
> Issue Type: Bug
> Affects Versions: Trunk
> Reporter: Ulrich Heidfeld
> Assignee: Nicolas Malin
> Priority: Critical
> Fix For: 17.12.01, Upcoming Branch, 18.12.01
>
> Attachments: OFBIZ-11281_Possible_Nullpointer_in_StringUtil#strToMap.patch
>
>
> StringUtil#strToMap(String, String, boolean, String) throws Nullpointer for StringUtil.strToMap("", false).
--
This message was sent by Atlassian Jira
(v8.3.4#803005)