[JBoss JIRA] (DROOLS-5216) Rule compilation error when binding fields indexed with square brackets
by Matteo Casalino (Jira)
Matteo Casalino created DROOLS-5216:
---------------------------------------
Summary: Rule compilation error when binding fields indexed with square brackets
Key: DROOLS-5216
URL: https://issues.redhat.com/browse/DROOLS-5216
Project: Drools
Issue Type: Bug
Components: core engine
Affects Versions: 7.35.0.Final
Reporter: Matteo Casalino
Assignee: Mario Fusco
Attachments: binding-field-indexed-with-square-brackets.zip
Executable model rule compilation fails on patters that bind a collection field indexed with square brackets
Example of DRL that fails to compile:
{noformat}
rule "binding field indexed with square brackets"
when Pojo($firstItem : integerList[0])
Pojo(integerList[this.integerList.size()-1] == $firstItem)
then
end
{noformat}
Error:
{noformat}
Message [id=1, level=ERROR, path=src/main/java/org/drools/reproducer/RulesE96881902F91EBF30C7D6404720A1A94RuleMethods0.java, line=29, column=138
text=no suitable method found for bind(org.drools.model.Variable<java.util.Map>,(org.drool[...]et(0))
method org.drools.model.PatternDSL.PatternDef.<A>bind(org.drools.model.Variable<A>,org.drools.model.functions.Function1<org.drools.reproducer.Pojo,A>) is not applicable
(inference variable A has incompatible bounds
equality constraints: java.util.Map
lower bounds: java.lang.Integer)
method org.drools.model.PatternDSL.PatternDef.<A>bind(org.drools.model.Variable<A>,org.drools.model.functions.Function1<org.drools.reproducer.Pojo,A>,org.drools.model.PatternDSL.ReactOn) is not applicable
(cannot infer type-variable(s) A
(actual and formal argument lists differ in length))
method org.drools.model.PatternDSL.PatternDef.<A,U>bind(org.drools.model.Variable<A>,org.drools.model.Variable<U>,org.drools.model.functions.Function1<U,A>) is not applicable
(cannot infer type-variable(s) A,U
(actual and formal argument lists differ in length))
{noformat}
The example works fine when compiling without executable model.
Furthermore, the same example expressed with OOPath fails to compile *both with and without executable model*:
{noformat}
rule "binding field indexed with square brackets in OOPath"
when Pojo($firstItem : /integerList[0])
Pojo(/integerList[this.integerList.size()-1] == $firstItem)
then
end
{noformat}
Error without executable model:
{noformat}
Message [id=1, kieBase=binding-field-indexed-with-square-brackets, level=ERROR, path=org/drools/reproducer/rules.drl, line=4, column=0
text=Unable to Analyse Expression /integerList[this.integerList.size()-1] == $firstItem:
[Error: Missing left node]
[Near : {... /integerList[this.integerList.size()-1] == $firstItem ....}]
{noformat}
Error with executable model:
{noformat}
Message [id=1, kieBase=binding-field-indexed-with-square-brackets, level=ERROR, path=org/drools/reproducer/rules.drl, line=-1, column=0
text=Unknown field integerList on class java.lang.Integer]
{noformat}
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
6 years, 3 months
[JBoss JIRA] (DROOLS-5214) Executable model compilation fails with constraints containing static method calls
by Mario Fusco (Jira)
[ https://issues.redhat.com/browse/DROOLS-5214?page=com.atlassian.jira.plug... ]
Mario Fusco commented on DROOLS-5214:
-------------------------------------
I reproduced the problem thanks a lot. As a side note I noticed that it happens only if you use the fully qualified name of the class on which you're calling the static method. As a temporary workaround (if necessary) you could import java.util.Arrays and use the simple name in the method invocation like in
{code}
import java.util.Arrays;
rule "Array asList"
when Pojo(Arrays.asList(1,5,2,3).containsAll(integerList))
then
end
{code}
> Executable model compilation fails with constraints containing static method calls
> ----------------------------------------------------------------------------------
>
> Key: DROOLS-5214
> URL: https://issues.redhat.com/browse/DROOLS-5214
> Project: Drools
> Issue Type: Bug
> Components: core engine
> Affects Versions: 7.35.0.Final
> Reporter: Matteo Casalino
> Assignee: Mario Fusco
> Priority: Major
> Attachments: static-methods-in-contraint.zip
>
>
> Executable model rule compilation fails on patterns containing Java static method calls as constraints
> Example of DRL that fails to compile:
> {noformat}
> rule "Array asList"
> when Pojo(java.util.Arrays.asList(1,5,2,3).containsAll(integerList))
> then
> end
> {noformat}
> or
> {noformat}
> rule "collections disjoint"
> when $p : Pojo($boundList : integerList) Pojo(id > $p.id, !java.util.Collections.disjoint( integerList , $boundList ))
> then
> end
> {noformat}
> or
> {noformat}
> rule "containsAll"
> when Pojo(integerList.containsAll(java.util.Arrays.asList(1,3)), integerList.size() == 2)
> then
> end
> {noformat}
> All above examples work fine when compiling without executable model.
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
6 years, 3 months
[JBoss JIRA] (DROOLS-5212) Latest Drools-compiler version has dependency of xstream-1.4.11.1.jar which causing HIGH vulnerability CVE-2013-7285
by Priti Rane (Jira)
[ https://issues.redhat.com/browse/DROOLS-5212?page=com.atlassian.jira.plug... ]
Priti Rane commented on DROOLS-5212:
------------------------------------
Thanks for replying. While doing analysis, I also found that it is already implemented in drools compiler. I think Anchor engine is just scanning the jar used and using cva vulnerability database against that jar to provide the analysis report. It doesn't check whether the security framework is implemented or not. Anyways thanks for your help. You can close this issue.
> Latest Drools-compiler version has dependency of xstream-1.4.11.1.jar which causing HIGH vulnerability CVE-2013-7285
> --------------------------------------------------------------------------------------------------------------------
>
> Key: DROOLS-5212
> URL: https://issues.redhat.com/browse/DROOLS-5212
> Project: Drools
> Issue Type: Enhancement
> Reporter: Priti Rane
> Assignee: Mario Fusco
> Priority: Major
>
> All drools compiler versions after 7.21.0.Final are using xstream version 1.14.11.1. We are using anchore engine for vulnerability scan and it is giving HIGH vulnerability CVE-2013-7285 - https://nvd.nist.gov/vuln/detail/CVE-2013-7285. There is a workaround to implement the security framework. However we are using kie-ci jar which has the drools-compiler dependency. So to resolve this , we have to implement the workaround in drools-compiler source code and build the jar and use it. But this solution is not maintainable.
> Is there any plans to implement the security framework in next version of drools-compiler ?
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
6 years, 3 months
[JBoss JIRA] (SWSQE-1109) Fix code coverage
by Filip Brychta (Jira)
Filip Brychta created SWSQE-1109:
------------------------------------
Summary: Fix code coverage
Key: SWSQE-1109
URL: https://issues.redhat.com/browse/SWSQE-1109
Project: Kiali QE
Issue Type: QE Task
Reporter: Filip Brychta
Assignee: Filip Brychta
Required parameters are not passed to kiali pod for some reason.
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
6 years, 3 months