Fixed Unused... checks don't work together (bug 805954)
This commit is contained in:
parent
0c717ef2ab
commit
cdbb83775e
|
|
@ -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>
|
||||
|
||||
|
|
|
|||
|
|
@ -117,7 +117,7 @@ public abstract class AbstractUsageCheck
|
|||
catch (SymbolTableException ste) {
|
||||
logError(ste);
|
||||
}
|
||||
ASTManager.getInstance().clear();
|
||||
ASTManager.getInstance().removeCheck(this);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue