apache / apache/lucene

java.util.MissingResourceException: Can't find bundle for base name org.apache.lucene.queryParser.messages.QueryParserMessages [LUCENE-6864]

Open
#7,922 0 comments 0 reactions 0 assignees View on GitHub
affects-version:5.2.1 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

If you call QueryNodeImpl.set but pass null, instead of getting a useful exception, you get a MissingResourceException:

```
java.util.MissingResourceException: Can't find bundle for base name org.apache.lucene.queryParser.messages.QueryParserMessages, locale en_AU
at java.util.ResourceBundle.throwMissingResourceException(ResourceBundle.java:1564)
at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:1387)
at java.util.ResourceBundle.getBundle(ResourceBundle.java:773)
at org.apache.lucene.queryparser.flexible.core.nodes.QueryNodeImpl.set(QueryNodeImpl.java:96)
```

---
Migrated from [LUCENE-6864](https://issues.apache.org/jira/browse/LUCENE-6864) by Trejkaz

Contributor guide

Open the contributing guide

Research direction

Start in org/apache/lucene/queryparser/flexible/core/nodes/QueryNodeImpl.java at QueryNodeImpl.set, identified in the stack trace, and inspect how a null argument reaches ResourceBundle lookup. Reproduce the call with null and verify that the completed change reports a useful exception instead of MissingResourceException.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
search
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.