[cfe] Remove unnecessary_null_comparison code
The frontend is now run with sound null safety so these are no longer needed. TEST=existing Change-Id: I6c1776845854695ff34e310a3bb5bc9d86715f06 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/307901 Reviewed-by: Jens Johansen <jensj@google.com> Reviewed-by: Srujan Gaddam <srujzs@google.com> Reviewed-by: Alexander Markov <alexmarkov@google.com> Commit-Queue: Johnni Winther <johnniwinther@google.com>
This commit is contained in:
committed by
Commit Queue
parent
e8f370ca4e
commit
82e3a751a9
@@ -20,10 +20,7 @@ Future<T?> withErrorHandling<T>(Future<T> Function() f,
|
||||
} catch (e, trace) {
|
||||
exitCode = 1;
|
||||
stderr.writeln(e);
|
||||
// ignore: unnecessary_null_comparison
|
||||
if (trace != null) {
|
||||
stderr.writeln(trace);
|
||||
}
|
||||
stderr.writeln(trace);
|
||||
logger?.noticeFrameworkCatchError(e, trace);
|
||||
return null;
|
||||
} finally {
|
||||
|
||||
@@ -198,10 +198,7 @@ class StdoutLogger implements Logger {
|
||||
@override
|
||||
void logUncaughtError(error, StackTrace stackTrace) {
|
||||
logMessage(error);
|
||||
// ignore: unnecessary_null_comparison
|
||||
if (stackTrace != null) {
|
||||
logMessage(stackTrace);
|
||||
}
|
||||
logMessage(stackTrace);
|
||||
}
|
||||
|
||||
@override
|
||||
|
||||
Reference in New Issue
Block a user