From 26f24db0a31e856a3eb6ef10bacab7142a8ded34 Mon Sep 17 00:00:00 2001 From: JanUlrich Date: Mon, 28 May 2018 17:08:08 +0200 Subject: [PATCH] Kleiner Fix am ASTWalker --- src/de/dhbwstuttgart/syntaxtree/AbstractASTWalker.java | 8 ++++---- src/de/dhbwstuttgart/typedeployment/TypeInsertPlacer.java | 6 ++---- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/src/de/dhbwstuttgart/syntaxtree/AbstractASTWalker.java b/src/de/dhbwstuttgart/syntaxtree/AbstractASTWalker.java index 4168b587..bf9fe263 100644 --- a/src/de/dhbwstuttgart/syntaxtree/AbstractASTWalker.java +++ b/src/de/dhbwstuttgart/syntaxtree/AbstractASTWalker.java @@ -66,10 +66,10 @@ public abstract class AbstractASTWalker implements ASTVisitor{ @Override public void visit(ParameterList formalParameters) { - Iterator genericIterator = formalParameters.getFormalparalist().iterator(); - if(genericIterator.hasNext()){ - while(genericIterator.hasNext()){ - genericIterator.next().accept(this); + Iterator it = formalParameters.getFormalparalist().iterator(); + if(it.hasNext()){ + while(it.hasNext()){ + it.next().accept(this); } } } diff --git a/src/de/dhbwstuttgart/typedeployment/TypeInsertPlacer.java b/src/de/dhbwstuttgart/typedeployment/TypeInsertPlacer.java index ad591ebe..9e5ba545 100644 --- a/src/de/dhbwstuttgart/typedeployment/TypeInsertPlacer.java +++ b/src/de/dhbwstuttgart/typedeployment/TypeInsertPlacer.java @@ -59,13 +59,11 @@ class TypeInsertPlacerClass extends AbstractASTWalker{ } @Override - public void visit(ParameterList params) { - for(FormalParameter param : params){ + public void visit(FormalParameter param) { if(param.getType() instanceof TypePlaceholder) inserts.add(TypeInsertFactory.createInsertPoints( param.getType(), param.getType().getOffset(), cl, method, results)); - } - super.visit(params); + super.visit(param); } @Override