Kleiner Fix am ASTWalker

This commit is contained in:
JanUlrich 2018-05-28 17:08:08 +02:00
parent 63ac79f02c
commit 57a82e8863
2 changed files with 6 additions and 8 deletions

View File

@ -66,10 +66,10 @@ public abstract class AbstractASTWalker implements ASTVisitor{
@Override @Override
public void visit(ParameterList formalParameters) { public void visit(ParameterList formalParameters) {
Iterator<FormalParameter> genericIterator = formalParameters.getFormalparalist().iterator(); Iterator<FormalParameter> it = formalParameters.getFormalparalist().iterator();
if(genericIterator.hasNext()){ if(it.hasNext()){
while(genericIterator.hasNext()){ while(it.hasNext()){
genericIterator.next().accept(this); it.next().accept(this);
} }
} }
} }

View File

@ -59,13 +59,11 @@ class TypeInsertPlacerClass extends AbstractASTWalker{
} }
@Override @Override
public void visit(ParameterList params) { public void visit(FormalParameter param) {
for(FormalParameter param : params){
if(param.getType() instanceof TypePlaceholder) if(param.getType() instanceof TypePlaceholder)
inserts.add(TypeInsertFactory.createInsertPoints( inserts.add(TypeInsertFactory.createInsertPoints(
param.getType(), param.getType().getOffset(), cl, method, results)); param.getType(), param.getType().getOffset(), cl, method, results));
} super.visit(param);
super.visit(params);
} }
@Override @Override