lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF subversion and git services (JIRA)" <>
Subject [jira] [Commented] (LUCENE-7303) Avoid NPE if classField doesn't exist in SNBC
Date Thu, 26 May 2016 14:20:12 GMT


ASF subversion and git services commented on LUCENE-7303:

Commit 8c6493151738314420ce5ffb678dbb9170c64d9a in lucene-solr's branch refs/heads/branch_6x
from [~teofili]
[;h=8c64931 ]

LUCENE-7303 - avoid NPE in MultiFields.getTerms(leafReader, classFieldName), removed duplicated
code in DocumentSNBC
(cherry picked from commit 8808cf5)

> Avoid NPE if classField doesn't exist in SNBC
> ---------------------------------------------
>                 Key: LUCENE-7303
>                 URL:
>             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

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message