[jboss-jira] [JBoss JIRA] Commented: (JBRULES-1722) Disabled rules still throws errors.

Michael Neale (JIRA) jira-events at lists.jboss.org
Mon Oct 13 03:33:21 EDT 2008


    [ https://jira.jboss.org/jira/browse/JBRULES-1722?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12433528#action_12433528 ] 

Michael Neale commented on JBRULES-1722:
----------------------------------------

FYI, in the repository there is a disable flag that will behave as expected (but it uses a different facility not in the drl itself). 

> Disabled rules still throws errors.
> -----------------------------------
>
>                 Key: JBRULES-1722
>                 URL: https://jira.jboss.org/jira/browse/JBRULES-1722
>             Project: JBoss Drools
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>    Affects Versions: 4.0.7
>         Environment: Windows XP.
>            Reporter: Le Huynh
>            Assignee: Michael Neale
>             Fix For: 5.0.0.M3
>
>
> When a rule throws an error (E.g. NullPointerException), disabling this rule does not ignore it and the error is still being thrown.
> So if the following rule:
> rule "rule1"
> 	no-loop true
> 	enabled false   // This should ignore this rule and not throw NPE
> 	when
> 		ObjectOne( object.subObject.name == "ObjectOne")   // This would throw a NPE if rule is active.
> 	then
> 		System.out.println( "blah1" );
> 	end;
> The fact passed in:
> public class ObjectOne
> {
>    	public String getName()
> 	{
> 		return "ObjectOne";
> 	}
> 	public ObjectOne getSubObject()
> 	{
> 		return null;   // Returning null intentionally.
> 	}
> }

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