Skip to content
This repository has been archived by the owner on Jan 20, 2022. It is now read-only.

Commit

Permalink
Chance-core : align to drools-core changes (JBRULES 3589)
Browse files Browse the repository at this point in the history
  • Loading branch information
sotty committed Aug 25, 2012
1 parent da40f01 commit eefddea
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,16 +42,17 @@ public <T, K> T don( Thing<K> core, Class<T> trait, Degree deg ) {
}

public <T, K> T don( K core, Class<T> trait, Degree deg ) {
T thing = applyTrait(core, trait);
return don( core, trait, deg, false );
}

public <T, K> T don( K core, Class<T> trait, Degree deg, boolean logical ) {
T thing = applyTrait( core, trait, logical );

((ImperfectTraitProxy) thing).setDegree( deg );

return doInsertTrait( thing, false );

}





}
Original file line number Diff line number Diff line change
Expand Up @@ -91,13 +91,13 @@ protected void createImperfectMvelConditionEvaluator(InternalWorkingMemory worki
((CompiledExpression)statement).getParserContext() :
new ParserContext(data.getParserConfiguration());
if ( statement.getKnownEgressType().isAssignableFrom( Degree.class ) ) {
conditionEvaluator = new ImperfectMvelConditionEvaluator( compilationUnit, context, statement, getDeclarations() );
conditionEvaluator = new ImperfectMvelConditionEvaluator( compilationUnit, context, statement, getRequiredDeclarations() );
} else {
conditionEvaluator = new MvelConditionEvaluator( compilationUnit, context, statement, getDeclarations() );
conditionEvaluator = new MvelConditionEvaluator( compilationUnit, context, statement, getRequiredDeclarations() );
wrapsPerfectConstraint = true;
}
} else {
conditionEvaluator = new ImperfectMvelConditionEvaluator( getParserConfiguration(workingMemory), expression, getDeclarations() );
conditionEvaluator = new ImperfectMvelConditionEvaluator( getParserConfiguration(workingMemory), expression, getRequiredDeclarations() );
}
}

Expand Down

0 comments on commit eefddea

Please sign in to comment.