Remove redundant null checks used with "instanceof"
SonarLint reports: Null checks should not be used with "instanceof" (squid:S4201) There's no need to null test in conjunction with an instanceof test. null is not an instanceof anything, so a null check is redundant. Change-Id: I29506aebfe337c8c300b46179e43b3057d9ae370
This commit is contained in:
@@ -37,9 +37,7 @@ public class AndChangeSource extends AndSource<ChangeData> implements ChangeData
|
||||
|
||||
@Override
|
||||
public boolean hasChange() {
|
||||
return source != null
|
||||
&& source instanceof ChangeDataSource
|
||||
&& ((ChangeDataSource) source).hasChange();
|
||||
return source instanceof ChangeDataSource && ((ChangeDataSource) source).hasChange();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user