[jboss-jira] [JBoss JIRA] (DROOLS-603) Make isA behave like instanceof when non-trait classes are involved
Davide Sottara (JIRA)
issues at jboss.org
Fri Sep 19 21:25:11 EDT 2014
[ https://issues.jboss.org/browse/DROOLS-603?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13004461#comment-13004461 ]
Davide Sottara commented on DROOLS-603:
---------------------------------------
Notice that using instanceof directly, when appropriate, will always result in better performance
> Make isA behave like instanceof when non-trait classes are involved
> -------------------------------------------------------------------
>
> Key: DROOLS-603
> URL: https://issues.jboss.org/browse/DROOLS-603
> Project: Drools
> Issue Type: Enhancement
> Reporter: Davide Sottara
> Assignee: Mark Proctor
>
> "isA" has a similar semantics to "instanceof", but works with combinations of traitable beans, trait proxies and trait classes.
> Currently, it does not work reliably when the left operand is a non-trait(able) object. It may try to access the internal trait data structures, which are not present, potentially throwing exceptions.
> For these cases, "isA" should not try to resolve trait types, but should fall
> back to the standard java "instanceof" operator.
--
This message was sent by Atlassian JIRA
(v6.3.1#6329)
More information about the jboss-jira
mailing list