You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Matt Whipple (JIRA)" <ji...@apache.org> on 2017/08/10 15:31:00 UTC
[jira] [Updated] (LUCENE-7926) Unsafe type cast in flexible parser
QueryNodeImpl
[ https://issues.apache.org/jira/browse/LUCENE-7926?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Matt Whipple updated LUCENE-7926:
---------------------------------
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.
Pacth enclosed...
was:
{{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.
Path enclosed...
> Unsafe type cast in flexible parser QueryNodeImpl
> -------------------------------------------------
>
> Key: LUCENE-7926
> URL: https://issues.apache.org/jira/browse/LUCENE-7926
> Project: Lucene - Core
> Issue Type: Bug
> Reporter: Matt Whipple
> Priority: Trivial
>
> {{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.
> Pacth enclosed...
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org