Kleiner Fix am ASTWalker

This commit is contained in:
JanUlrich 2018-05-28 17:08:08 +02:00
parent c7042d185f
commit 26f24db0a3
2 changed files with 6 additions and 8 deletions

View File

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

View File

@ -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