Details
-
Bug
-
Status: Open
-
Trivial
-
Resolution: Unresolved
-
None
-
None
-
None
-
None
-
New
Description
org.apache.lucene.queryparser.flexible.core.nodes.QueryNodeImplL67 casts the argument to QueryNodeImpl although the rest of the code is written against the QueryNode interface. This blows up in cases where a non-inheriting implementation is passed (such as using a wrapper/decorator class).
The relevant setParent method does not exist on the interface, so the most backwards compatible short term fix would be to wrap the cast in a conditional to ensure it is safe (more significant changes to the hierarchy may make sense but this seems like a fairly stable module).
Patch enclosed...