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)); |
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
Luca Molteni> Rebasing JP is something that happens every six months, I think we can handle a few patches a year | |
11:31:14 <Luca Molteni> Let’s do like this @marekn, give me your local branch you’re trying to rebase against and I’ll apply the changes | |
11:31:26 <marekn> maybe get back to contributing back and handle it like 3rd party will help | |
11:31:54 <Luca Molteni> ? | |
11:32:05 <Luca Molteni> the reason why we forked that is not that we don’t want to contribute back | |
11:32:13 <marekn> @Luca Molteni I can handle that, just that fork is really not standard and we have similar forks in kiegroup and we could get rid off them | |
11:32:26 <Luca Molteni> in fact I already contributed to some patches to JP | |
11:32:51 <marekn> great, what stops us to use basically java-parser from upstream? | |
11:33:07 <marekn> and not having it on our maintenance? | |
11:33:17 <Luca Molteni> that we need a grammar that is both java and drl and grammars don’t compose |