Skip to content

Commit

Permalink
Removed compilation errors in Eclipse (#6069)
Browse files Browse the repository at this point in the history
  • Loading branch information
pibizza committed Sep 6, 2024
1 parent a2599c7 commit 38e7d2f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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()).<Class<?>>map(TypedDeclarationSpec::getDeclarationClass)
.orElseGet(() -> getClassFromAssignment(consequenceExpr, actionArg));
} else if (actionArg.isLiteralExpr()) {
actionClass = literalType(actionArg.asLiteralExpr());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,8 @@ private Optional<NewBinding> methodCallExprParameter(PatternDescr basePattern, B
String rootNodeName = getRootNodeName(methodCallWithoutRootNode);
Optional<TypedDeclarationSpec> decl = context.getTypedDeclarationById(rootNodeName);

Class<?> clazz = decl.map(TypedDeclarationSpec::getDeclarationClass)

Class<?> clazz = decl.<Class<?>>map(TypedDeclarationSpec::getDeclarationClass)
.orElseGet( () -> {
try {
return context.getTypeResolver().resolveType(rootNodeName);
Expand Down

0 comments on commit 38e7d2f

Please sign in to comment.