Null dereference [LUCENE-6627]
Open
affects-version:6.0
legacy-jira-fix-version:6.0
legacy-jira-label:github-pullrequest
legacy-jira-priority:Minor
module:queryparser
type:bug
- Dominant language
- Java
- Stars
- 3.6k
- Forks
- 1.4k
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 88
Description
In the file `PhraseSlopQueryNode.java`, calls to `getChild()` and `getChildren()` might return null. Further operations on them might cause null pointer exceptions.
These can be fixed by checking for null in returned values.
---
Migrated from [LUCENE-6627](https://issues.apache.org/jira/browse/LUCENE-6627) by Rishabh Patel, updated May 09 2016
Contributor guide
Research direction
Start in PhraseSlopQueryNode.java and inspect the getChild() and getChildren() call sites. Verify how their returned values are used, then ensure null results cannot lead to null pointer exceptions. Done means the affected operations safely handle null values; no test file is named in the issue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- search
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100