[
https://issues.apache.org/jira/browse/CONNECTORS-645?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Maciej Lizewski updated CONNECTORS-645:
---------------------------------------
Description:
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...
was:
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...
> 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