Uploaded image for project: 'Jackrabbit Oak'
  1. Jackrabbit Oak
  2. OAK-4830

StringUtils.estimateMemoryUsage() can throw NullPointerException

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.5.10
    • 1.5.11, 1.6.0
    • commons
    • None
    • Patch

    Description

      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.

      Attachments

        1. OAK-4830.1.patch
          2 kB
          Matt Ryan

        Activity

          People

            mreutegg Marcel Reutegger
            mattvryan Matt Ryan
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: