From 627e2225bd9572014b0d480d647c1fbfd0b4bf3c Mon Sep 17 00:00:00 2001 From: Paolo Bizzarri Date: Thu, 5 Sep 2024 16:38:42 +0200 Subject: [PATCH] Removed compilation errors in Eclipse --- .../java/org/drools/impact/analysis/parser/impl/RhsParser.java | 2 +- .../generator/visitor/accumulate/AccumulateVisitor.java | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/drools-impact-analysis/drools-impact-analysis-parser/src/main/java/org/drools/impact/analysis/parser/impl/RhsParser.java b/drools-impact-analysis/drools-impact-analysis-parser/src/main/java/org/drools/impact/analysis/parser/impl/RhsParser.java index d11ef174a0c..735b36881e4 100644 --- a/drools-impact-analysis/drools-impact-analysis-parser/src/main/java/org/drools/impact/analysis/parser/impl/RhsParser.java +++ b/drools-impact-analysis/drools-impact-analysis-parser/src/main/java/org/drools/impact/analysis/parser/impl/RhsParser.java @@ -97,7 +97,7 @@ private Class getActionClass(RuleContext context, MethodCallExpr consequenceE Expression actionArg = statement.getArgument(0); Class actionClass = null; if (actionArg.isNameExpr()) { - actionClass = context.getTypedDeclarationById(actionArg.toString()).map(TypedDeclarationSpec::getDeclarationClass) + actionClass = context.getTypedDeclarationById(actionArg.toString()).>map(TypedDeclarationSpec::getDeclarationClass) .orElseGet(() -> getClassFromAssignment(consequenceExpr, actionArg)); } else if (actionArg.isLiteralExpr()) { actionClass = literalType(actionArg.asLiteralExpr()); diff --git a/drools-model/drools-model-codegen/src/main/java/org/drools/model/codegen/execmodel/generator/visitor/accumulate/AccumulateVisitor.java b/drools-model/drools-model-codegen/src/main/java/org/drools/model/codegen/execmodel/generator/visitor/accumulate/AccumulateVisitor.java index e998f3a3578..f0a06a9d2eb 100644 --- a/drools-model/drools-model-codegen/src/main/java/org/drools/model/codegen/execmodel/generator/visitor/accumulate/AccumulateVisitor.java +++ b/drools-model/drools-model-codegen/src/main/java/org/drools/model/codegen/execmodel/generator/visitor/accumulate/AccumulateVisitor.java @@ -281,7 +281,8 @@ private Optional methodCallExprParameter(PatternDescr basePattern, B String rootNodeName = getRootNodeName(methodCallWithoutRootNode); Optional decl = context.getTypedDeclarationById(rootNodeName); - Class clazz = decl.map(TypedDeclarationSpec::getDeclarationClass) + + Class clazz = decl.>map(TypedDeclarationSpec::getDeclarationClass) .orElseGet( () -> { try { return context.getTypeResolver().resolveType(rootNodeName);