Uploaded image for project: '[Read Only] - Hippo Site Toolkit 2'
  1. [Read Only] - Hippo Site Toolkit 2
  2. HSTTWO-4302

Hst Head Contribution robustness

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.3.0
    • Component/s: None
    • Similar issues:
    • Flagged:
      Flagged

      Description

      Hi there,

       

      i stumbled upon a part of your code, namely:

       

                          reader = new StringReader(xmlText);
                          Document doc = docBuilder.parse(new InputSource(reader));
      

      This will throw NPEs whenever there is a head contribution that is a blank string.

      Wouldn't it be an easy fix to do s.th. like this:

      possible patch
                          if (org.apache.commons.lang3.StringUtils.isNotBlank(xmlText) {
                            reader = new StringReader(xmlText);
                            Document doc = docBuilder.parse(new InputSource(reader));
                         }
      

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              heins.thorben@guj.de Thorben Heins
            • Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: