[jboss-jira] [JBoss JIRA] (DROOLS-493) Error to declare Map/List with generics when having a modify() on RHS

RH Bugzilla Integration (JIRA) issues at jboss.org
Tue Sep 23 13:36:02 EDT 2014


    [ https://issues.jboss.org/browse/DROOLS-493?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13005466#comment-13005466 ] 

RH Bugzilla Integration commented on DROOLS-493:
------------------------------------------------

Mario Fusco <mfusco at redhat.com> changed the Status of [bug 1142886|https://bugzilla.redhat.com/show_bug.cgi?id=1142886] from ASSIGNED to MODIFIED

> Error to declare Map/List with generics when having a modify() on RHS
> ---------------------------------------------------------------------
>
>                 Key: DROOLS-493
>                 URL: https://issues.jboss.org/browse/DROOLS-493
>             Project: Drools
>          Issue Type: Bug
>         Environment: * OS: Mac OS X 10.9.2
> * Java SE 1.7    
> * Drools Runtime 6.1.0-Final   
>            Reporter: Jinghai Rao
>            Assignee: Mario Fusco
>             Fix For: 6.2.0.CR1
>
>
> For the following rule
> -----------------------------
> package com.sample
>  
> import java.util.Map;
> import java.util.HashMap;
> declare TestFact
>     @propertyReactive
>     data : String
> end
> rule "Test Rule"
>     when
>         $fact : TestFact()
>     then
>         Map<String,String> a = new HashMap<String,String>();
>         modify ($fact) {setData("0")}
> end
> ------------------------
> We get the following exception:
> java.lang.RuntimeException: Error while creating KieBase[Message [id=1, level=ERROR, path=rules/Sample.drl, line=11, column=0
>    text=Unable to resolve type Map<String,String>:
> Unable to find class 'Map<String,String>']]
> 	at org.drools.compiler.kie.builder.impl.KieContainerImpl.getKieBase(KieContainerImpl.java:260)
> 	at org.drools.compiler.kie.builder.impl.KieContainerImpl.newKieSession(KieContainerImpl.java:400)
> 	at org.drools.compiler.kie.builder.impl.KieContainerImpl.newKieSession(KieContainerImpl.java:375)
> 	at com.sample.DroolsTest.main(DroolsTest.java:17)
> If we remove the generics, or not using modify(), this has no error. 



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


More information about the jboss-jira mailing list