Fixed leak in IndetationCheck (always clear the chaches ;)

This commit is contained in:
Oleg Sukhodolsky 2003-10-10 16:42:54 +00:00
parent 861e2af0e1
commit 0dfec6f430
2 changed files with 7 additions and 0 deletions

View File

@ -228,6 +228,12 @@ public class HandlerFactory
return new MethodCallHandler(aIndentCheck, aAst, aParent);
}
/** Clears cache of created handlers. */
void clearCreatedHandlers()
{
mCreatedHandlers.clear();
}
/** cache for created method call handlers */
private Map mCreatedHandlers = new HashMap();
}

View File

@ -230,6 +230,7 @@ public class IndentationCheck extends Check
*/
public void beginTree(DetailAST aAst)
{
mHandlerFactory.clearCreatedHandlers();
mHandlers.clear();
mHandlers.push(new PrimordialHandler(this));
}