From 38fc609b9b1d5a28d2ece868c7da3b0c25e22aee Mon Sep 17 00:00:00 2001 From: I-Al-Istannen Date: Sun, 27 Aug 2023 21:47:21 +0200 Subject: [PATCH] fix: Use wildcard type in CtUnaryOperator get/setOperand --- src/main/java/spoon/reflect/code/CtUnaryOperator.java | 4 ++-- .../spoon/support/reflect/code/CtUnaryOperatorImpl.java | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main/java/spoon/reflect/code/CtUnaryOperator.java b/src/main/java/spoon/reflect/code/CtUnaryOperator.java index f9a2e18c14e..31755759c95 100644 --- a/src/main/java/spoon/reflect/code/CtUnaryOperator.java +++ b/src/main/java/spoon/reflect/code/CtUnaryOperator.java @@ -31,13 +31,13 @@ public interface CtUnaryOperator extends CtExpression, CtStatement { * Gets the expression to which the operator is applied. */ @PropertyGetter(role = EXPRESSION) - CtExpression getOperand(); + CtExpression getOperand(); /** * Sets the expression to which the operator is applied. */ @PropertySetter(role = EXPRESSION) - C setOperand(CtExpression expression); + C setOperand(CtExpression expression); /** * Sets the kind of this operator. diff --git a/src/main/java/spoon/support/reflect/code/CtUnaryOperatorImpl.java b/src/main/java/spoon/support/reflect/code/CtUnaryOperatorImpl.java index 0a92e05ffc8..6ab215f3c60 100644 --- a/src/main/java/spoon/support/reflect/code/CtUnaryOperatorImpl.java +++ b/src/main/java/spoon/support/reflect/code/CtUnaryOperatorImpl.java @@ -29,7 +29,7 @@ public class CtUnaryOperatorImpl extends CtExpressionImpl implements CtUna String label; @MetamodelPropertyField(role = EXPRESSION) - CtExpression operand; + CtExpression operand; @Override public void accept(CtVisitor visitor) { @@ -37,7 +37,7 @@ public void accept(CtVisitor visitor) { } @Override - public CtExpression getOperand() { + public CtExpression getOperand() { return operand; } @@ -76,7 +76,7 @@ public C insertBefore(CtStatementList statements) { } @Override - public C setOperand(CtExpression expression) { + public C setOperand(CtExpression expression) { if (expression != null) { expression.setParent(this); }