Clone Tools
  • last updated a few minutes ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Mvel parser: Support modify statement with new line (#2429)

* Mvel parser: Support modify statement with new line

* Failing test

* While extracting modified properties in a chain of methods, don't use the last getter

  1. … 4 more files in changeset.
[DROOLS-4207] Error while beta joining short and integer fields (#2419)

* Avoid casting numeric expressions while using equality helper

* Reproducer (still not the same error)

* Always use helper method for number comparison

* Null check for uncast, to be removed

* Always use helper for equality, this time for real

* Renamed

* Also box other comparisons

* Add overloads to allow compiler to emit valid code

* Fix QueryTest without types

* Fix negative test

* Removed TODO

* Added assert to test

  1. … 3 more files in changeset.
[DROOLS-4207] Error in executable model while joining fields with short and int (#2408)

* Three tests

* Better test without declared types

* Avoid casting nameExprs

* Use Number.class in indexedBy

* Removed test

* renamed test

  1. … 3 more files in changeset.
DROOLS-4184 Fix first set of issues reported by SonarCloud (#2398)

* DROOLS-4181 Fix blocker issues reported by SonarCloud

* DROOLS-4181 Fix critical issues reported by SonarCloud

* DROOLS-4181 Fix first set of major issues reported by SonarCloud

* DROOLS-4181 Fix second set of major issues reported by SonarCloud

* DROOLS-4181 Fix third set of major issues reported by SonarCloud

* DROOLS-4181 Fix test related to SonarCloud fixes.

* DROOLS-4181 Fix downstream problems.

  1. … 137 more files in changeset.
[DROOLS-4175] Error in compiling BigLiteral binding as literal (#2388)

* Two failing tests

* Avoid try to parse a String as a BigDecimal or BigInteger literal if it's a declaration

* Better fix

  1. … 2 more files in changeset.
[DROOLS-4104] Mvel-compiler (#2381)

* First commit

Some data type

First two phases

Some design

Rules of the game

Improved visitors

Copy and pasted solution

Removed inlinecast

Removed other classes

Algorithm explained

Other possible phases

Try to parse only types

First commit

Removed imperative assignment

Create type information phase

Subtyping!

toString

Test runnning

Removed phase

Moved packages

Moved packages

Moved context

FlattenExpressionPhase

FlattenExpressionPhase

New Phase

Refactor test

* New test

* Flatten phase

* Avoid flatten

* Inverted phase 2 and 3

* Process first node using the tree

* Navigating tree?

* JavaParser utilities

* Removed javaparser-utilities

* Removed javaparser-utilities

* Removed stream

* Only one phase, visiting the tree

* Moved error message

* Refactor

* Error message

* Reintroduced original grammar to support block

* Disabled comma expression in grammar, they should be only inside a modify block

* Variable declaration

* Multiple statements

* Refactor test

* Convert property access mixed

* Test modify

* Correct mvel modify syntax

* Renamed to DroolsConstraintParserTest.java

* New test in parser for modify

* Support MVEl modify statements

* Fix consequence

* Removed attach_pid files from git

* Modify is a statement, not an expression

* First draft of modify compiling

* testSetter

* StringLiteralExpressionT.java

* Removed duplicated test

* Method to find the stter

* Split among LHS and RHS

* String literal expression

* setter test passing, every other test failing

* Fixed property test

* Create a new declaration if missing

* Modify test

* Added transitive depedency

* Removed useless code

* Removed dependency from Drools Model Compiler

* Plugged in mvel compiler

* Refactor renaming

* Type is optional now

* Missing the scope from field accessors

* Public field accessor

* Pass scope instead of stack in context

* Refactor

* added todo

* Fix scope

* Refactor

* Uncompiled expression

* Plugged mvel compiler, found problems with modify and semicolons

* Added support for semicolon in mvel modify syntax

* Ignored test

* Added test

* Fix 7.20

* Preprocess methodcallexpr in modify statements

* sanitize single line scripts

* Plugged in compiler, removed validation of mvel scripts

* testAccessor ForArguments

* Better default method

* Fix testAccessorInArguments, broke other tests

* Fix all tests

* Removed println

* Better semicolons

* Semicolon sanitizier

* Also propagate errors

* Removed useless test

* Fix type in binary expressions

* Better sanitizier for modify

* Better sanitizer 2

* Do not append ; to empty strings

* Added modify object among modified properties

* Implement update with modify blocks

* Type resolver

* Better test

* Added trace of LHS

* Create new reference when missing

* Assume only one variable per decorator, removed declaration/declarator dualism

* testInitializerArrayAccess

* TypedExpression is an interface rather than an abstract class

* Map conversion

* testMixArrayMap and testMVELConsequenceWithMapsAndArray

* Test without semicolon

* Without semicolon test

* Fix rebase

* Fix hardcoded version

* Better test without semicolon

* simple test without semicolon

* Another test with method call

* Another test with method call

* Fix comment in GeneratedDrlConstraintParserTokenManagerBase.java

* Failing test with comment

* Test with comments passing

* Unignored test with comments

* New test for single line statement

* Single line block with comment with both and without semicolon

* Support empty statements with only new line

* All test passing

* Fix ModifyPreprocessPhase.java

* Fix first modify rewrite code, removed custom modify parsing

* Support new line in argument list

* Removed debug mode

* test property reactivity

* Fix modify empty block

* Fix new lines in argument list

* Removed SemicolonSanitizer.java

* Fix property reactivity

* Avoid processing nested methodCallExpr in modify setters

* fix NPE

* Refactor Mvel rewrite

* Removed mvel validation

* Removed unused import

* Fix AccumulateTest.testAccumulateMVELWithModify

* Fixed testNoLoopAccumulate

* Support target type when RHS type is missing

* Fix all AccumulaTest

* ImportsTest

* New test for EOL in BinaryExpr

* Support EOL after binary expr token

* Fix Nesting Test added new test for BinaryExpr with newLine

* Support variable declaration without initializer

* Fix StreamTest, correct drools scope

* Support arbitrary expressions in modify block

* Cep test, 4 tests left

* Better test

* Test for crashing pretty printer

* Fix rebase

* Added new test for new line expressions

* Added two new tests

* Fix typo

* Added negative test

* Formatting

* renamed test

* With statement support

* Constructor in with statement

* Correct implementation of with preprocessor

* Refactor

* Recurse over ModifyProcessor

* Fix MapInitializationDrools3800 by recursing the modify preprocessor

* Fix MapInitializationDrools3800 by recursing the modify preprocessor

* Use mvel compiler instead of ExpressionTyper during parsing of Mvel Accumulate Nodes

* Fix NPE

* Compilation after updating JP

* Fix mvel compiler dependency

* Fix version

* minimalized reproducer

* AST reproducer

* Compare reproducer with AssertJ

* Compare AST with diff, more similar

* Even more similar

* Avoid sharing static nodes that breaks the pretty printer

* Removed debugPrettyPrinter

* Reintroduced needed class generation

* Fix testPrettyPrinterCrashing

* Reverted model writer

* Revert packagemodel

* Reverted packageModel

* Removed PrettyPrinterTest.java

* Reverted ExpressionTyperTest.java

* Removed README.MD

* Duplication of removal of EmptyStmt

* Fixed ModifyCompilerTest

* Fix version

* Failing test for nested modify

* Recurse over blocks in consequence, new test for failing

* Fix ordering of with preprocessor

* Removed duplication in nested Modify preprocessor and fixed ordering

* Removed TODO

* Removed unused properties

* Public fields on LHS

* Removed another TODO

* Better type check

* Removed last todo

* Dependency in -boostrap

* Unsupported cases in DorolsConstraintParserTest

* Also support window EOL

* Renamed drools-constraint-parser to drools-mvel-parser

* Fix OSGI

* Assertj to test

* Removed ignore to 3505 test

* Fix typo

* Fix trace message

* Formatting

* Removed trace

* Added README.md of the module that explains how it works

* Fix typo

* Removed currying renamed method

* Renamed modified properties to used bindings

* Typo

* Removed drlconstraintparser

* Used consumer in test, reformatting

* Unused statement

* Added some documentation

* Improved documentation of the module

  1. … 144 more files in changeset.
[DROOLS-4125] restore TypeResolver and RuleUnitDescritors after Knowl… (#2374)

* [DROOLS-4125] restore TypeResolver and RuleUnitDescritors after KnowledgePackage cloning

* additional change

* [DROOLS-4125] restore TypeResolver and RuleUnitDescritors after KnowledgePackage cloning

  1. … 4 more files in changeset.
Update Java Parser from 3.10.2 to 3.13.10 (#2353)

* Drools compile after upgrade of JP from 3.10.2 to 3.13.10

* DrlNameExpr is a NameExpr

* support toString in DroolsConstraintParser nodes

  1. … 14 more files in changeset.
[DROOLS-4010] Improved Shading of drools-model file (#2348)

* [DROOLS-4010] Improved Shading of drools-model:

- Removed double slash

- Uses internalKieModule.getResource instead of kproject class loader

(ensures running MultiModuleTest in drools-jbpm-integration)

* Removed useless cast

DROOLS-4021 Fix executable model file path on Windows (#2346)

[DROOLS-3825] Use stable names for generated classes

  1. … 1 more file in changeset.
[DROOLS-3825] Use stable names for generated classes

[DROOLS-3875] Shade drools-model file based on the GAV of the KJar in… (#2340)

* [DROOLS-3875] Shade drools-model file based on the GAV of the KJar in order to

support multiple modules in a KieClassPathContainer

* Removed the downcast and the version as different version with same GA are not supported anyway.

  1. … 1 more file in changeset.
[DROOLS-3960] Executable Model - kie-maven-plugin fails to generate model with a mix of Java and DRL facts (#2327)

* test

* Removed test

* Use eclipse compiler instead of Native to handle 3960

NativeCompiler won't compile DeclaredTypes with fields using class from the KJar

as it won't resolve any Maven compiled class

[DROOLS-3961] avoid using javax.xml.bind.DatatypeConverter when generating the md5 hashing for constraints in executable model

[DROOLS-3961] generate constraints ids in executable model using a MD5 hashing

[DROOLS-3802] Build error with executable-model, nested property with double-bytes property name (#2302)

* testCapitalLetter

* Remove hack for enums

  1. … 2 more files in changeset.
[DROOLS-3800] Parser error with executable-model on Map literal expression in constraint (#2300)

* Test case for map initialization

* MVEL Map initialization literal test

* Parsing of map initialization literal

* Support MapLiteralInitialization as argument

* Return type of map

* testMapInitialization passing

* Convert name to field accessor

* new test for failing two properties

* Ignored two pattern test

* Added regression test

* Empty Map literal

* Renamed test

* Added JIRA URLs

  1. … 10 more files in changeset.
[DROOLS-3708] executable-model misses to raise an error for a non-exisiting method with Mvel dialect (#2269)

* First draft of validation

* Valid if no declared methods are present

* Removed useless code

* Removed compilation

* Added comment

* Moved consequenceValidation in the context

* Validate after having generated the types

* Validate classes with function

* Renamed memory file system

* Better class loader

* All MvelDialectTest passing

* Removed trace

* Optimized imports

* Avoid creating class loader when not needed

  1. … 3 more files in changeset.
DROOLS-3717 Don't process internal private classes during parse (#2271)

DROOLS-3716 Add javax.annotation-api dependency (#2270)

  1. … 1 more file in changeset.
Drools Constraint Parser (#2266)

* Namespace changes

* Fix print util

* Compile

* Lots of test passing

* Other test passing

* 5 tests failing

* 4 tests filing

* 43 + 122

* 43+110

* 45+96

* 45+82

* 47+52

* 47+48

* NullSafeFieldAccess and NullSafeMethodCall

* 47 + 32

* 47 + 27

* 47+17

* 51+1

* 4 test failed! omg

* 2 test left

* Two tests left

* Fix cep tests

* 1 test left

* Fixed all tests in drools-model-compiler

* Sanitize scope during eval of constand fields

* Drools-constraint-parser

* FromVisitor support from DrlNameExpr

* Removed enforcer skip, explicit version

* Removed useless plugings

* Removed templating-maven-plugin and license tag

* Added brace statements

* Space after if

  1. … 110 more files in changeset.
[DROOLS-3661] Executable model cannot parse enum in a constraint with from (#2263)

  1. … 1 more file in changeset.
Avoid reinizialize n-time fields for bitmask each update (#2251)

  1. … 1 more file in changeset.
Fix map access expression with recursive paths (#2240)

  1. … 2 more files in changeset.
[DROOLS-3556] implement property reactivity for update statements in mvel consequences (#2239)

  1. … 2 more files in changeset.
Fix for drlx-parser rebase (#2216)

* Added file

* Updated to drlx-parser after rebasing to 3.10.2

  1. … 6 more files in changeset.
[DROOLS-3560] fix compiler error in executable model when there is a clash between a field and a class name

  1. … 1 more file in changeset.
[DROOLS-3508] Search for Mvel dialect in Package attributes (#2215)

* [DROOLS-3508] Also search for Mvel dialect in pkg attributes

* Move setDialect in RuleContext

* Removed comment

  1. … 2 more files in changeset.
Fixes 3505 - support comma in modify statements (#2214)

  1. … 1 more file in changeset.