[jboss-jira] [JBoss JIRA] (JBRULES-3260) Events with no expiration declared being set to zero expirationOffset during package assembly

Rob Crawford (Created) (JIRA) jira-events at lists.jboss.org
Fri Oct 21 15:42:45 EDT 2011


Events with no expiration declared being set to zero expirationOffset during package assembly
---------------------------------------------------------------------------------------------

                 Key: JBRULES-3260
                 URL: https://issues.jboss.org/browse/JBRULES-3260
             Project: Drools
          Issue Type: Bug
      Security Level: Public (Everyone can see)
          Components: drools-core  (expert), drools-core (fusion)
    Affects Versions: 5.3.0.Final, 5.3.0.CR1
            Reporter: Rob Crawford
            Assignee: Mark Proctor


Had a problem with events being expired immediately on being inserted. These events have no @expiration declaration. Tracing and debugging led to this line:

ReteooRuleBase, line 477:
node.setExpirationOffset( Math.max( node.getExpirationOffset(), typeDeclaration.getExpirationOffset()+1 ) );

Since neither the type and its supertype have expirations declared, getExpirationOffset() returns -1 in both cases. Max(-1, -1 + 1) == 0, so the event is assigned an expiration of zero.

Should make sure not to set the expiration when both are already -1.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jboss-jira mailing list