Fixed Unused... checks don't work together (bug 805954)

This commit is contained in:
Rick Giles 2003-09-14 22:39:58 +00:00
parent 0c717ef2ab
commit cdbb83775e
3 changed files with 14 additions and 7 deletions

View File

@ -251,6 +251,8 @@
<li class="body">Unused local variables are not always detected (bug 798111)</li>
<li class="body">Fixed allowThrowsTagsForSubclasses/allowMissingThrowsTag interfere (bug 803577) </li>
<li class="body">Unused... checks don't work together (bug 805954)</li>
</ul>

View File

@ -117,7 +117,7 @@ public abstract class AbstractUsageCheck
catch (SymbolTableException ste) {
logError(ste);
}
ASTManager.getInstance().clear();
ASTManager.getInstance().removeCheck(this);
}
/**

View File

@ -197,13 +197,18 @@ public final class ASTManager
}
/**
* Clears all managed elements.
* Removes a check and its check nodes. Clears all managed elements if
* last check removed.
* @param check
*/
public void clear()
public void removeCheck(AbstractUsageCheck aCheck)
{
mCheckNodes.clear();
mCompleteTree = null;
mMap.clear();
mTrees.clear();
mCheckNodes.remove(aCheck);
if (mCheckNodes.isEmpty()) {
mCompleteTree = null;
mMap.clear();
mTrees.clear();
}
}
}