unnecessary null comparison (#67525)

This commit is contained in:
Alexandre Ardhuin
2020-10-08 09:26:30 +02:00
committed by GitHub
parent 0b78110b26
commit 0d8d4f77aa
10 changed files with 38 additions and 64 deletions

View File

@@ -42,8 +42,7 @@ DriverError _createInvalidKeyValueTypeError(String invalidType) {
abstract class CommandWithTarget extends Command {
/// Constructs this command given a [finder].
CommandWithTarget(this.finder, {Duration timeout}) : super(timeout: timeout) {
if (finder == null)
throw DriverError('$runtimeType target cannot be null');
assert(finder != null, '$runtimeType target cannot be null');
}
/// Deserializes this command from the value generated by [serialize].