This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Index: drools-model/drools-model-compiler/src/main/java/org/drools/modelcompiler/util/lambdareplace/ExecModelLambdaPostProcessor.java | |
| IDEA additional info: | |
| Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP | |
| <+>UTF-8 | |
| =================================================================== | |
| --- drools-model/drools-model-compiler/src/main/java/org/drools/modelcompiler/util/lambdareplace/ExecModelLambdaPostProcessor.java (revision ef99c4aa364699c1c17ffa5468ee9f57ab241177) | |
| +++ drools-model/drools-model-compiler/src/main/java/org/drools/modelcompiler/util/lambdareplace/ExecModelLambdaPostProcessor.java (revision 353b46ed16a0d7dd0a988a0293eafb5ed1cc9011) | |
| @@ -29,6 +29,7 @@ | |
| import com.github.javaparser.ast.CompilationUnit; | |
| import com.github.javaparser.ast.body.MethodDeclaration; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Scratch { | |
| public static void main(String[] args) { | |
| SumOOP sumOOP = new SumOOP(2, 3); | |
| System.out.println("sumOOP = " + sumOOP.compute()); | |
| SumNoOOP sumNoOOP = new SumNoOOP(2, 3); | |
| int sumNoOOp = sumNoOOP.getA() + sumNoOOP.getB(); | |
| System.out.println("sumNoOOP = " + sumNoOOP); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| bfdc39aa1c32e28a77e0fbdc0b784d483f916bfb is the first bad commit | |
| commit bfdc39aa1c32e28a77e0fbdc0b784d483f916bfb | |
| Author: Matteo Mortari <[email protected]> | |
| Date: Mon Jul 22 09:30:20 2019 +0200 | |
| DROOLS-4325 DMN filtering drools-model file for kie-dmn-core tests (#2449) | |
| kie-dmn/kie-dmn-core/pom.xml | 13 +++++++++++++ | |
| .../test/filtered-resources/org/kie/dmn/core/drools-model | 1 + | |
| .../src/test/resources/org/kie/dmn/core/drools-model | 1 - |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| BinaryExpr expr = ((DrlxParseSuccess) drlxParseResult).getExpr().asBinaryExpr(); | |
| String expr1 = printConstraint(expr.asBinaryExpr().getLeft()); | |
| DrlxParseResult drlxParseResult1 = constraintParser.drlxParse(patternType, patternIdentifier, expr1, isPositional); | |
| patternConstraintParseResults.add(new PatternConstraintParseResult(expr1, patternIdentifier, drlxParseResult1)); | |
| String expr2 = printConstraint(expr.asBinaryExpr().getRight()); | |
| DrlxParseResult drlxParseResult2 = constraintParser.drlxParse(patternType, patternIdentifier, expr2, isPositional); | |
| patternConstraintParseResults.add(new PatternConstraintParseResult(expr2, patternIdentifier, drlxParseResult2)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @Test | |
| public void testPatternMatchingOverNumberWhileAccumulatingShort() { | |
| String drl= | |
| "import " + AccumulateResult.class.getCanonicalName() + "\n" + | |
| "import " + Person.class.getCanonicalName() + "\n" + | |
| "\n" + | |
| "rule \"accumulate_max_short_using_double\"\n" + | |
| " dialect \"java\"\n" + | |
| " when\n" + |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @Test | |
| @Ignore("why does this fail in both drl and exec model?") | |
| public void testIntegerShort() { | |
| String str = | |
| "import " + Result.class.getCanonicalName() + ";" + | |
| "import " + Person.class.getCanonicalName() + ";" + | |
| "rule R when\n" + | |
| " $r : Result()\n" + | |
| " $markV : Person(name == \"Mark\")\n" + |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * Copyright 2005 JBoss Inc | |
| * | |
| * Licensed under the Apache License, Version 2.0 (the "License"); | |
| * you may not use this file except in compliance with the License. | |
| * You may obtain a copy of the License at | |
| * | |
| * http://www.apache.org/licenses/LICENSE-2.0 | |
| * | |
| * Unless required by applicable law or agreed to in writing, software |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| \[\d\d\d\d-\d\d-\d\d\s\d\d:\d\d:\d\d,\d\d\d\] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| {"!":"com.github.javaparser.ast.CompilationUnit","imports":[{"!":"com.github.javaparser.ast.ImportDeclaration","range":{"beginLine":1,"beginColumn":1,"endLine":1,"endColumn":19},"tokenRange":{"beginToken":{"kind":36,"text":"import"},"endToken":{"kind":98,"text":";"}},"isAsterisk":"true","isStatic":"false","name":{"!":"com.github.javaparser.ast.expr.Name","range":{"beginLine":1,"beginColumn":8,"endLine":1,"endColumn":16},"tokenRange":{"beginToken":{"kind":89,"text":"java"},"endToken":{"kind":89,"text":"util"}},"identifier":"util","qualifier":{"!":"com.github.javaparser.ast.expr.Name","range":{"beginLine":1,"beginColumn":8,"endLine":1,"endColumn":11},"tokenRange":{"beginToken":{"kind":89,"text":"java"},"endToken":{"kind":89,"text":"java"}},"identifier":"java"}}},{"!":"com.github.javaparser.ast.ImportDeclaration","range":{"beginLine":1,"beginColumn":1,"endLine":1,"endColumn":26},"tokenRange":{"beginToken":{"kind":36,"text":"import"},"endToken":{"kind":98,"text":";"}},"isAsterisk":"true","isStatic":"false","name" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.util.function.Consumer; | |
| public class Example { | |
| public static void main(String[] args) { | |
| Sprinkler $sprinkler = new Sprinkler(); | |
| // modify( $sprinkler ) { setOn( true ) }; | |
| modify($sprinkler, (s) -> s.setOn(true)); |