[jboss-jira] [JBoss JIRA] Resolved: (JBRULES-1766) Error in BaseIntFieldClassReader for ArrayList ( size == 1)
Edson Tirelli (JIRA)
jira-events at lists.jboss.org
Tue Sep 16 09:34:21 EDT 2008
[ https://jira.jboss.org/jira/browse/JBRULES-1766?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Edson Tirelli resolved JBRULES-1766.
------------------------------------
Fix Version/s: 5.0.0.M2
Resolution: Cannot Reproduce Bug
Assignee: Edson Tirelli (was: Mark Proctor)
Michael,
I was not able to reproduce the problem you mentioned. I added one more test case to drools source code anyway (see commits for this ticket).
If you are able to reproduce the problem, would you please attach a test case so that I can see and fix the problem?
Also, please not that even being possible to use "collect" to count the number of facts, if you only want to count them, the preferred (lighter) way of doing is using accumulate function count:
Number( intValue == 1 ) from accumulate( SomeFact(), count(1) )
[]s
Edson
> Error in BaseIntFieldClassReader for ArrayList ( size == 1)
> -----------------------------------------------------------
>
> Key: JBRULES-1766
> URL: https://jira.jboss.org/jira/browse/JBRULES-1766
> Project: JBoss Drools
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Affects Versions: 5.0.0.M2
> Environment: Eclipse 3.4; Drools SVN trunk from today, Linux
> Reporter: Michael Zimmermann
> Assignee: Edson Tirelli
> Fix For: 5.0.0.M2
>
>
> The following rule worked perfectly with drools 4.0.x. Using Drools Trunk (post 5.0 M1) I do get an error in org.drools.base.extractors.BaseIntClassFiieldReader. Changing the ArrayList (size==1) definition to ArrayList() works, though.
> rule "MyRule"
> when
> ArrayList( size == 1 ) from collect ( SomeClass( ) )
> then
> do_something ()
> end
> As this is some hack also published on the mailing list for counting facts, I would expect to see this contruct to be compatible with drools 4.0.x
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list