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:
parent
afdca9913e
commit
c12b2b4fcf
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue