apache / apache/lucene

Potential null pointer exception [LUCENE-6625]

Open
#7,683 1 comment 0 reactions 0 assignees View on GitHub
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 `GroupQueryNode.java`, there are several calls to `getChild()` and `getChildren()` whose results could be null. Further operations on them would lead to null pointer exceptions.

Fix by checking for null

---
Migrated from [LUCENE-6625](https://issues.apache.org/jira/browse/LUCENE-6625) by Rishabh Patel, updated May 09 2016

Contributor guide

Open the contributing guide

Research direction

Start in GroupQueryNode.java and inspect each getChild() and getChildren() call mentioned in the issue. Identify which returned values can be null, add the requested safeguards, and verify that the affected query-node behavior no longer raises null pointer exceptions.

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
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.