Uploaded image for project: 'Apache NiFi'
  1. Apache NiFi
  2. NIFI-2006

Null attribute values causing NPEs in provenance repo

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.0.0, 0.7.0, 1.0.0-Beta
    • Component/s: None
    • Labels:
      None

      Description

      A null attribute value (as you would see for a removed attribute) causes the provenance repo to thrown an NPE here:

      https://github.com/apache/nifi/blob/master/nifi-nar-bundles/nifi-provenance-repository-bundle/nifi-persistent-provenance-repository/src/main/java/org/apache/nifi/provenance/PersistentProvenanceRepository.java#L1789

      (as "entry.getValue()" is null...)

      suggested fix is to change:

      if (entry.getValue().length() > maxAttributeChars) {
      

      to:

      if (entry.getValue() != null && entry.getValue().length() > maxAttributeChars) {
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                ozhurakousky Oleg Zhurakousky
                Reporter:
                devriesb Brandon Rhys DeVries
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: