You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@manifoldcf.apache.org by "Maciej Lizewski (JIRA)" <ji...@apache.org> on 2013/02/13 14:18:12 UTC

[jira] [Created] (CONNECTORS-645) forced metadata causes NPE on document deletion

Maciej Lizewski created CONNECTORS-645:
------------------------------------------

             Summary: forced metadata causes NPE on document deletion
                 Key: CONNECTORS-645
                 URL: https://issues.apache.org/jira/browse/CONNECTORS-645
             Project: ManifoldCF
          Issue Type: Bug
          Components: Framework core
            Reporter: Maciej Lizewski
            Priority: Blocker


WorkerThread::deleteDocument
{
      if (version.length() == 0)
        deleteDocument(documentIdentifier);
      else
        ingestDocument(documentIdentifier,version,null,null);
    }

look at the 'else' part - it calls ingestDocument with NULL as document paramter. Then look at ingestDocument:

      // Modify the repository document with forced parameters.
      for (String paramName : forcedMetadata.keySet())
      {
        Set<String> values = forcedMetadata.get(paramName);
        String[] paramValues = new String[values.size()];
        int j = 0;
        for (String value : values)
        {
          paramValues[j++] = value;
        }
        data.addField(paramName,paramValues);
      }

it tries to set forced metadata even if 'data' (document) is null...

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira