Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- WARNING: An illegal reflective access operation has occurred
- WARNING: Illegal reflective access by com.thoughtworks.xstream.core.util.Fields (file:/home/evacchi/.m2/repository/com/thoughtworks/xstream/xstream/1.4.11.1/xstream-1.4.11.1.jar) to field java.util.TreeMap.comparator
- WARNING: Please consider reporting this to the maintainers of com.thoughtworks.xstream.core.util.Fields
- WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
- WARNING: All illegal access operations will be denied in a future release
- 16:34:04.055 [main] DEBUG o.d.m.b.g.e.ExpressionTyper.toTypedExpression:119 - Typed expression Input: drlxExpr = intValue() , patternType = class java.math.BigDecimal ,declarations = []
- 16:34:04.071 [main] DEBUG o.d.m.b.g.e.ExpressionTyper.toTypedExpression:124 - Typed expression Output: {expression=TypedExpression{expression=_this.intValue(), jpType=MethodCallExpr, type=int, fieldName='null', unificationVariable=Optional.empty, unificationName=Optional.empty}, usedDeclarations=[], reactOnProperties =[]}
- 16:34:04.075 [main] DEBUG o.d.m.b.g.e.ExpressionTyper.toTypedExpression:119 - Typed expression Input: drlxExpr = 0 , patternType = class java.math.BigDecimal ,declarations = []
- 16:34:04.075 [main] DEBUG o.d.m.b.g.e.ExpressionTyper.toTypedExpression:124 - Typed expression Output: {expression=TypedExpression{expression=0, jpType=IntegerLiteralExpr, type=int, fieldName='null', unificationVariable=Optional.empty, unificationName=Optional.empty}, usedDeclarations=[], reactOnProperties =[]}
- 16:34:04.229 [main] DEBUG o.d.m.b.g.e.ExpressionTyper.toTypedExpression:119 - Typed expression Input: drlxExpr = intValue() , patternType = class java.math.BigDecimal ,declarations = []
- 16:34:04.229 [main] DEBUG o.d.m.b.g.e.ExpressionTyper.toTypedExpression:124 - Typed expression Output: {expression=TypedExpression{expression=_this.intValue(), jpType=MethodCallExpr, type=int, fieldName='null', unificationVariable=Optional.empty, unificationName=Optional.empty}, usedDeclarations=[], reactOnProperties =[]}
- 16:34:04.229 [main] DEBUG o.d.m.b.g.e.ExpressionTyper.toTypedExpression:119 - Typed expression Input: drlxExpr = 0 , patternType = class java.math.BigDecimal ,declarations = []
- 16:34:04.230 [main] DEBUG o.d.m.b.g.e.ExpressionTyper.toTypedExpression:124 - Typed expression Output: {expression=TypedExpression{expression=0, jpType=IntegerLiteralExpr, type=int, fieldName='null', unificationVariable=Optional.empty, unificationName=Optional.empty}, usedDeclarations=[], reactOnProperties =[]}
- 16:34:04.484 [main] DEBUG o.d.m.builder.PackageSources.logSource:78 - =====
- 16:34:04.484 [main] DEBUG o.d.m.builder.PackageSources.logSource:79 - package org.drools.modelcompiler;
- import java.util.*;
- import org.drools.model.*;
- import org.drools.modelcompiler.dsl.pattern.D;
- import org.drools.model.Index.ConstraintType;
- import java.time.*;
- import java.time.format.*;
- import java.text.*;
- import org.drools.core.util.*;
- import java.math.BigDecimal;
- import org.drools.model.Model;
- public abstract class Rules7206AFD5D1A571D4760AE4693F2F5EFD implements Model {
- public final static DateTimeFormatter DATE_TIME_FORMATTER = DateTimeFormatter.ofPattern(DateUtils.getDateFormatMask(),
- Locale.ENGLISH);
- @Override
- public String getName() {
- return "org.drools.modelcompiler";
- }
- public static Date string_2_date(String s) {
- return GregorianCalendar.from(LocalDate.parse(s,
- DATE_TIME_FORMATTER).atStartOfDay(ZoneId.systemDefault()))
- .getTime();
- }
- @Override
- public List<org.drools.model.EntryPoint> getEntryPoints() {
- return Arrays.asList(D.entryPoint("result"),
- D.entryPoint("output1"),
- D.entryPoint("positive_or_negative"),
- D.entryPoint("input1"));
- }
- @Override
- public List<org.drools.model.Global> getGlobals() {
- return globals;
- }
- @Override
- public List<org.drools.model.TypeMetaData> getTypeMetaDatas() {
- return typeMetaDatas;
- }
- public static final org.drools.model.Global<java.lang.String> var_result = D.globalOf(java.lang.String.class,
- "org.drools.modelcompiler",
- "result");
- public static final org.drools.model.Global<org.drools.ruleunit.DataSource> var_output1 = D.globalOf(org.drools.ruleunit.DataSource.class,
- "org.drools.modelcompiler",
- "output1");
- public static final org.drools.model.Global<java.lang.String> var_positive_or_negative = D.globalOf(java.lang.String.class,
- "org.drools.modelcompiler",
- "positive_or_negative");
- public static final org.drools.model.Global<org.drools.ruleunit.DataSource> var_input1 = D.globalOf(org.drools.ruleunit.DataSource.class,
- "org.drools.modelcompiler",
- "input1");
- List<org.drools.model.Global> globals = new ArrayList<>();
- List<org.drools.model.TypeMetaData> typeMetaDatas = Collections.emptyList();
- {
- globals.add(var_result);
- globals.add(var_output1);
- globals.add(var_positive_or_negative);
- globals.add(var_input1);
- }
- }
- 16:34:04.491 [main] DEBUG o.d.m.builder.PackageSources.logSource:80 - =====
- 16:34:04.500 [main] DEBUG o.d.m.builder.PackageSources.logSource:78 - =====
- 16:34:04.500 [main] DEBUG o.d.m.builder.PackageSources.logSource:79 - package org.drools.modelcompiler;
- import java.util.*;
- import org.drools.model.*;
- import org.drools.modelcompiler.dsl.pattern.D;
- import org.drools.model.Index.ConstraintType;
- import java.time.*;
- import java.time.format.*;
- import java.text.*;
- import org.drools.core.util.*;
- import java.math.BigDecimal;
- import static org.drools.modelcompiler.Rules7206AFD5D1A571D4760AE4693F2F5EFD.*;
- public class Rules7206AFD5D1A571D4760AE4693F2F5EFD_PositiveNegativeDTUnit extends Rules7206AFD5D1A571D4760AE4693F2F5EFD {
- @Override
- public String getName() {
- return super.getName() + ".PositiveNegativeDTUnit";
- }
- @Override
- public String getPackageName() {
- return super.getName();
- }
- /**
- * With the following expression ID:
- * org.drools.modelcompiler.builder.generator.DRLIdGenerator@5398edd0
- */
- @Override
- public List<org.drools.model.Rule> getRules() {
- return rules;
- }
- public List<Rule> getRulesList() {
- return Arrays.asList(Rules7206AFD5D1A571D4760AE4693F2F5EFD_PositiveNegativeDTUnitRuleMethods0.rule_R1(),
- Rules7206AFD5D1A571D4760AE4693F2F5EFD_PositiveNegativeDTUnitRuleMethods0.rule_R2());
- }
- List<org.drools.model.Rule> rules = getRulesList();
- @Override
- public List<org.drools.model.Query> getQueries() {
- return java.util.Collections.emptyList();
- }
- }
- 16:34:04.501 [main] DEBUG o.d.m.builder.PackageSources.logSource:80 - =====
- 16:34:04.508 [main] DEBUG o.d.m.builder.PackageSources.logSource:78 - =====
- 16:34:04.508 [main] DEBUG o.d.m.builder.PackageSources.logSource:79 - package org.drools.modelcompiler;
- import java.util.*;
- import org.drools.model.*;
- import org.drools.modelcompiler.dsl.pattern.D;
- import org.drools.model.Index.ConstraintType;
- import java.time.*;
- import java.time.format.*;
- import java.text.*;
- import org.drools.core.util.*;
- import java.math.BigDecimal;
- import static org.drools.modelcompiler.Rules7206AFD5D1A571D4760AE4693F2F5EFD.*;
- public class Rules7206AFD5D1A571D4760AE4693F2F5EFD_PositiveNegativeDTUnitRuleMethods0 {
- /**
- * Rule name: R1
- */
- public static org.drools.model.Rule rule_R1() {
- final org.drools.model.UnitData<java.lang.String> var_result = D.unitData(java.lang.String.class,
- "result");
- final org.drools.model.UnitData<org.drools.ruleunit.DataSource> var_output1 = D.unitData(org.drools.ruleunit.DataSource.class,
- "output1");
- final org.drools.model.UnitData<java.lang.String> var_positive_or_negative = D.unitData(java.lang.String.class,
- "positive_or_negative");
- final org.drools.model.UnitData<org.drools.ruleunit.DataSource> var_input1 = D.unitData(org.drools.ruleunit.DataSource.class,
- "input1");
- final org.drools.model.Variable<java.math.BigDecimal> var_GENERATED_$pattern_BigDecimal$1$ = D.declarationOf(java.math.BigDecimal.class,
- DomainClassesMetadata7206AFD5D1A571D4760AE4693F2F5EFD.java_math_BigDecimal_Metadata_INSTANCE,
- "GENERATED_$pattern_BigDecimal$1$",
- D.from(var_input1));
- org.drools.model.Rule rule = D.rule("org.drools.modelcompiler",
- "R1").unit(org.drools.modelcompiler.RuleUnitCompilerTest.PositiveNegativeDTUnit.class)
- .build(D.pattern(var_GENERATED_$pattern_BigDecimal$1$).expr("A2EC7CB8AE538AF07AD89A19790E2028",
- (java.math.BigDecimal _this) -> org.drools.modelcompiler.util.EvaluationUtil.greaterOrEqualNumbers(_this.intValue(),
- 0)),
- D.on(var_output1).execute((org.drools.ruleunit.DataSource output1) -> {
- output1.insert("positive");
- }));
- return rule;
- }
- /**
- * Rule name: R2
- */
- public static org.drools.model.Rule rule_R2() {
- final org.drools.model.UnitData<java.lang.String> var_result = D.unitData(java.lang.String.class,
- "result");
- final org.drools.model.UnitData<org.drools.ruleunit.DataSource> var_output1 = D.unitData(org.drools.ruleunit.DataSource.class,
- "output1");
- final org.drools.model.UnitData<java.lang.String> var_positive_or_negative = D.unitData(java.lang.String.class,
- "positive_or_negative");
- final org.drools.model.UnitData<org.drools.ruleunit.DataSource> var_input1 = D.unitData(org.drools.ruleunit.DataSource.class,
- "input1");
- final org.drools.model.Variable<java.math.BigDecimal> var_GENERATED_$pattern_BigDecimal$2$ = D.declarationOf(java.math.BigDecimal.class,
- DomainClassesMetadata7206AFD5D1A571D4760AE4693F2F5EFD.java_math_BigDecimal_Metadata_INSTANCE,
- "GENERATED_$pattern_BigDecimal$2$",
- D.from(var_input1));
- org.drools.model.Rule rule = D.rule("org.drools.modelcompiler",
- "R2").unit(org.drools.modelcompiler.RuleUnitCompilerTest.PositiveNegativeDTUnit.class)
- .build(D.pattern(var_GENERATED_$pattern_BigDecimal$2$).expr("6B84791EF63D6F840C6239B18E8215E6",
- (java.math.BigDecimal _this) -> org.drools.modelcompiler.util.EvaluationUtil.lessThanNumbers(_this.intValue(),
- 0)),
- D.on(var_output1).execute((org.drools.ruleunit.DataSource output1) -> {
- output1.insert("negative");
- }));
- return rule;
- }
- }
- 16:34:04.508 [main] DEBUG o.d.m.builder.PackageSources.logSource:80 - =====
- 16:34:04.509 [main] DEBUG o.d.m.builder.PackageSources.logSource:78 - =====
- 16:34:04.510 [main] DEBUG o.d.m.builder.PackageSources.logSource:79 - package org.drools.modelcompiler;
- public class DomainClassesMetadata7206AFD5D1A571D4760AE4693F2F5EFD {
- public static final org.drools.model.DomainClassMetadata java_math_BigDecimal_Metadata_INSTANCE = new java_math_BigDecimal_Metadata();
- private static class java_math_BigDecimal_Metadata implements org.drools.model.DomainClassMetadata {
- @Override
- public Class<?> getDomainClass() {
- return java.math.BigDecimal.class;
- }
- @Override
- public int getPropertiesSize() {
- return 0;
- }
- @Override
- public int getPropertyIndex( String name ) {
- switch(name) {
- }
- throw new RuntimeException("Unknown property '" + name + "' for class class class java.math.BigDecimal");
- }
- }
- public static final org.drools.model.DomainClassMetadata java_lang_String_Metadata_INSTANCE = new java_lang_String_Metadata();
- private static class java_lang_String_Metadata implements org.drools.model.DomainClassMetadata {
- @Override
- public Class<?> getDomainClass() {
- return java.lang.String.class;
- }
- @Override
- public int getPropertiesSize() {
- return 3;
- }
- @Override
- public int getPropertyIndex( String name ) {
- switch(name) {
- case "blank": return 0;
- case "bytes": return 1;
- case "empty": return 2;
- }
- throw new RuntimeException("Unknown property '" + name + "' for class class class java.lang.String");
- }
- }
- public static final org.drools.model.DomainClassMetadata org_drools_ruleunit_DataSource_Metadata_INSTANCE = new org_drools_ruleunit_DataSource_Metadata();
- private static class org_drools_ruleunit_DataSource_Metadata implements org.drools.model.DomainClassMetadata {
- @Override
- public Class<?> getDomainClass() {
- return org.drools.ruleunit.DataSource.class;
- }
- @Override
- public int getPropertiesSize() {
- return 0;
- }
- @Override
- public int getPropertyIndex( String name ) {
- switch(name) {
- }
- throw new RuntimeException("Unknown property '" + name + "' for class class interface org.drools.ruleunit.DataSource");
- }
- }
- }
- 16:34:04.514 [main] DEBUG o.d.m.builder.PackageSources.logSource:80 - =====
- 16:34:06.174 [main] DEBUG o.d.c.c.DefaultAgenda$ExecutionStateMachine.setCurrentState:1433 - State was INACTIVE is now FIRING_ALL_RULES
- 16:34:06.201 [main] DEBUG o.d.c.c.DefaultAgenda$ExecutionStateMachine.setCurrentState:1433 - State was FIRING_ALL_RULES is now HALTING
- 16:34:06.202 [main] DEBUG o.d.c.c.DefaultAgenda$ExecutionStateMachine.setCurrentState:1433 - State was HALTING is now INACTIVE
- 16:34:06.202 [main] DEBUG o.d.c.c.DefaultAgenda$ExecutionStateMachine.setCurrentState:1433 - State was INACTIVE is now FIRING_ALL_RULES
- 16:34:06.203 [main] DEBUG o.d.c.c.DefaultAgenda$ExecutionStateMachine.setCurrentState:1433 - State was FIRING_ALL_RULES is now HALTING
- 16:34:06.203 [main] DEBUG o.d.c.c.DefaultAgenda$ExecutionStateMachine.setCurrentState:1433 - State was HALTING is now INACTIVE
- java.lang.AssertionError:
- Expected :negative
- Actual :null
- <Click to see difference>
- at org.junit.Assert.fail(Assert.java:88)
- at org.junit.Assert.failNotEquals(Assert.java:834)
- at org.junit.Assert.assertEquals(Assert.java:118)
- at org.junit.Assert.assertEquals(Assert.java:144)
- at org.drools.modelcompiler.RuleUnitCompilerTest.testWith2Rules(RuleUnitCompilerTest.java:183)
- at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
- at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
- at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
- at java.base/java.lang.reflect.Method.invoke(Method.java:566)
- at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
- at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
- at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
- at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
- at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
- at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
- at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
- at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
- at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
- at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
- at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
- at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
- at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
- at org.junit.runners.Suite.runChild(Suite.java:128)
- at org.junit.runners.Suite.runChild(Suite.java:27)
- at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
- at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
- at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
- at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
- at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
- at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
- at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
- at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68)
- at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:47)
- at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242)
- at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement