mariofusco commented on code in PR #5944:
URL:
https://github.com/apache/incubator-kie-drools/pull/5944#discussion_r1600184992
##########
drools-model/drools-model-codegen/src/main/java/org/drools/model/codegen/execmodel/generator/drlxparse/SpecialComparisonCase.java:
##########
@@ -67,13 +65,8 @@ static SpecialComparisonCase
specialComparisonFactory(TypedExpression left, Type
return new PlainEvaluation(left, right);
}
- private static Optional<Class<?>> typeNeedsCast(Type t) {
- boolean needCast = isObject((Class<?>)t) || isMap((Class<?>) t) ||
isList((Class<?>) t);
- if (needCast) {
- return of((Class<?>) t);
- } else {
- return Optional.empty();
- }
+ private static boolean typeNeedsCast(Type t) {
Review Comment:
The Optional wasn't really necessary here since the result was used only as
a boolean testing if the Optional was present or not.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]