Fixed NullPointerException when encountering minimal ContentData node property

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@2304 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Derek Hulley
2006-02-06 16:48:27 +00:00
parent e27b81132e
commit cecaaf4fd3

View File

@@ -1400,7 +1400,7 @@ public class LuceneIndexerImpl extends LuceneBase implements LuceneIndexer
if (isContent) if (isContent)
{ {
ContentData contentData = DefaultTypeConverter.INSTANCE.convert(ContentData.class, value); ContentData contentData = DefaultTypeConverter.INSTANCE.convert(ContentData.class, value);
if (index) if (contentData.getMimetype() != null && index)
{ {
// store mimetype in index - even if content does not index it is useful // store mimetype in index - even if content does not index it is useful
doc.add(new Field(attributeName + ".mimetype", contentData.getMimetype(), false, true, doc.add(new Field(attributeName + ".mimetype", contentData.getMimetype(), false, true,