Uploaded image for project: 'FOP'
  1. FOP
  2. FOP-2317

FOP warning causing a crash

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 2.5
    • None
    • unqualified
    • None
    • Windows 7

    Description

      <fo:table-cell width="" border-left="0.5pt green dashed">
      <fo:block>Cell</fo:block>
      </fo:table-cell>

      FOP issues a warning because border-left has an invalid structure (the border-style should be placed before the border-color).

      In FObj.warnOnUnknownProperties(), there is a call to getAttributeNameForValue() to find the name of the attribute whose value is unknown, then it stumbles on the width="" property, which returns a null object when instantiated. And there goes a NPE which leads to a crash:

      if (prop.equals(value)) {
      return attributeName;
      }

      I attached a patch which encloses the above code with a simple if-test.

      Attachments

        1. warning_problem.fo
          0.7 kB
          Seifeddine Dridi
        2. patch.diff
          0.8 kB
          Seifeddine Dridi

        Activity

          People

            Unassigned Unassigned
            sdridi Seifeddine Dridi
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: