lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matt Whipple (JIRA)" <j...@apache.org>
Subject [jira] [Issue Comment Deleted] (LUCENE-7926) Unsafe type cast in flexible parser QueryNodeImpl
Date Thu, 10 Aug 2017 19:32:00 GMT

     [ https://issues.apache.org/jira/browse/LUCENE-7926?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Matt Whipple updated LUCENE-7926:
---------------------------------
    Comment: was deleted

(was: This can lead to issues when attempting to modify the tree with such a decorator in
a node's ancestry. I'll have to circle back to figure out the all of the relevant tentacles
later.)

> 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
>         Attachments: LUCENE-7926.patch
>
>
> {{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...



--
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


Mime
View raw message