Matt Ryan updated OAK-4830:
    Attachment: OAK-4830.1.patch

I've added OAK-4830.1.patch which I believe can address this issue.  The only 
change to regular code is to return 0 if the string passed in is null.  A unit 
test was added also.

> StringUtils.estimateMemoryUsage() can throw NullPointerException
> ----------------------------------------------------------------
>                 Key: OAK-4830
>                 URL: https://issues.apache.org/jira/browse/OAK-4830
>             Project: Jackrabbit Oak
>          Issue Type: Bug
>          Components: commons
>    Affects Versions: 1.5.10
>            Reporter: Matt Ryan
>         Attachments: OAK-4830.1.patch
> The {{estimateMemoryUsage()}} method in {{StringUtils}} in {{oak-commons}} 
> doesn't check if the string being passed in is null, so there's potential to 
> throw a {{NullPointerException}} if called with a null string.
> Suggest it returns 0 in this case.  I have a patch ready.

This message was sent by Atlassian JIRA

Reply via email to