From 4cb294fc6f40ecf690a898006c8355257db89eb2 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 --- .../fr/inria/spoon/dataflow/scanners/DataFlowScanner.java | 2 +- src/main/java/spoon/reflect/code/CtUnaryOperator.java | 4 ++-- .../spoon/support/reflect/code/CtUnaryOperatorImpl.java | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/spoon-dataflow/src/main/java/fr/inria/spoon/dataflow/scanners/DataFlowScanner.java b/spoon-dataflow/src/main/java/fr/inria/spoon/dataflow/scanners/DataFlowScanner.java index a272608f0ab..ae1b80e78cc 100644 --- a/spoon-dataflow/src/main/java/fr/inria/spoon/dataflow/scanners/DataFlowScanner.java +++ b/spoon-dataflow/src/main/java/fr/inria/spoon/dataflow/scanners/DataFlowScanner.java @@ -1399,7 +1399,7 @@ public void visitCtUnaryOperator(CtUnaryOperator operator) case PREINC: case POSTDEC: case PREDEC: - CtExpression operand = operator.getOperand(); + CtExpression operand = operator.getOperand(); Expr prevExpr; if (operand instanceof CtArrayWrite) { 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); }