[
https://issues.apache.org/jira/browse/LUCENE-7303?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15302125#comment-15302125
]
ASF subversion and git services commented on LUCENE-7303:
---------------------------------------------------------
Commit 8808cf5373522f37bce509729b0b3a7fc9bcbd88 in lucene-solr's branch
refs/heads/master from [~teofili]
[ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=8808cf5 ]
LUCENE-7303 - avoid NPE in MultiFields.getTerms(leafReader, classFieldName),
removed duplicated code in DocumentSNBC
> Avoid NPE if classField doesn't exist in SNBC
> ---------------------------------------------
>
> Key: LUCENE-7303
> URL: https://issues.apache.org/jira/browse/LUCENE-7303
> Project: Lucene - Core
> Issue Type: Bug
> Components: modules/classification
> Reporter: Tommaso Teofili
> Assignee: Tommaso Teofili
> Fix For: 6.1
>
>
> {{SimpleNaiveBayesClassifier}} uses _MultiFields.getTerms(leafReader,
> classFieldName)._ but doesn't check if the resulting _Terms_ is null or not.
> While that is unlikely to happen (it doesn't make much sense to use a
> classifier without specifying an existing class field), it may happen during
> testing and therefore better to avoid throwing a NPE.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]