add some IllegalArgument checks

git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@2882 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
This commit is contained in:
sjfink 2008-06-11 14:31:39 +00:00
parent afdca9913e
commit c12b2b4fcf
1 changed files with 6 additions and 1 deletions

View File

@ -928,9 +928,14 @@ public class ClassHierarchy implements IClassHierarchy {
* Does c implement i?
*
* @return true iff i is an interface and c is a class that implements i, or c is an interface that extends i.
*
*/
public boolean implementsInterface(IClass c, IClass i) {
if (i == null) {
throw new IllegalArgumentException("Cannot ask implementsInterface with i == null");
}
if (c == null) {
throw new IllegalArgumentException("Cannot ask implementsInterface with c == null");
}
if (!i.isInterface()) {
return false;
}