You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Adrien Grand (JIRA)" <ji...@apache.org> on 2016/06/09 14:28:20 UTC
[jira] [Closed] (LUCENE-3780) An incomplete fix for the NPE bugs in
ParallelReader.java
[ https://issues.apache.org/jira/browse/LUCENE-3780?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Adrien Grand closed LUCENE-3780.
--------------------------------
Resolution: Unresolved
ParallelReader.java has changed a lot and this bug is not relevant anymore.
> An incomplete fix for the NPE bugs in ParallelReader.java
> ---------------------------------------------------------
>
> Key: LUCENE-3780
> URL: https://issues.apache.org/jira/browse/LUCENE-3780
> Project: Lucene - Core
> Issue Type: Bug
> Components: core/index
> Affects Versions: 3.0
> Reporter: Guangtai Liang
> Priority: Critical
> Labels: incomplete_fix, missing_fixes
> Original Estimate: 10m
> Remaining Estimate: 10m
>
> The fix revision 407851 was aimed to remove an NPE bug on the return value of "fieldToReader.get(field)" in the methods "getTermFreqVector", "hasNorms", "norms", "doSetNorm" of the file "/lucene/java/trunk/src/java/org/apache/lucene/index/ParallelReader.java
> " , but it is incomplete.
> Since the returned value "fieldToReader.get(field)" could be null during the runtime execution, its value should also be null-checked before being dereferenced in other methods.
> The buggy code locations the same fix needs to be applied at are as bellows:
>
> Line 499 of the method "ParallelTermEnum()" :
> public ParallelTermEnum() throws IOException {
> try {
> field = fieldToReader.firstKey();
> } catch(NoSuchElementException e) {
> // No fields, so keep field == null, termEnum == null
> return;
> }
> if (field != null)
> [Line 499] termEnum = fieldToReader.get(field).terms();
> }
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org