[jboss-jira] [JBoss JIRA] (DROOLS-589) Removing a rule with a join node having the same alpha node as both right and left input causes an Exception

Mario Fusco (JIRA) issues at jboss.org
Mon Sep 1 13:46:01 EDT 2014


Mario Fusco created DROOLS-589:
----------------------------------

             Summary: Removing a rule with a join node having the same alpha node as both right and left input causes an Exception
                 Key: DROOLS-589
                 URL: https://issues.jboss.org/browse/DROOLS-589
             Project: Drools
          Issue Type: Bug
      Security Level: Public (Everyone can see)
            Reporter: Mario Fusco
            Assignee: Mario Fusco


Reproducer:

{code}
    @Test
    public void testRemoveWithDuplicatedCondition() {
        String packageName = "test_same_condition_pk" ;
        String rule = "package " + packageName + ";" +
                      "rule 'test_same_condition' \n" +
                      "when \n" +
                      " String(this == \"1\") \n" +
                      " String(this == \"1\") \n" +
                      "then \n" +
                      "System.out.println('test same condition rule'); \n"+
                      "end";
        KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();
        kbuilder.add( ResourceFactory.newByteArrayResource( rule.getBytes() ), ResourceType.DRL );
        if ( kbuilder.hasErrors() ) {
            fail( kbuilder.getErrors().toString() );
        }
        KnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase();
        kbase.addKnowledgePackages( kbuilder.getKnowledgePackages() );
        kbase.removeKnowledgePackage(packageName);
    }
{code}



--
This message was sent by Atlassian JIRA
(v6.3.1#6329)


More information about the jboss-jira mailing list