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

    • Improvement
    • Status: Closed
    • Normal
    • Resolution: Fixed
    • None
    • 5.3.0
    • None
    • 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

            Unassigned Unassigned
            heins.thorben@guj.de Thorben Heins (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: