Skip to content

Commit cc1383e

Browse files
parloughCommit Queue
authored andcommitted
[analyzer] Remove unnecessary non-null assertion util
These assertions are no longer necessary now that the analyzer always runs in sound mode now. Change-Id: Ie5888c3f424b69fda39d55d442770c51accdc8f9 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/424360 Reviewed-by: Konstantin Shcheglov <[email protected]> Commit-Queue: Konstantin Shcheglov <[email protected]> Reviewed-by: Samuel Rawlins <[email protected]>
1 parent 7f932b0 commit cc1383e

File tree

4 files changed

+1
-50
lines changed

4 files changed

+1
-50
lines changed

pkg/analyzer/lib/src/source/package_map_resolver.dart

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import 'package:analyzer/file_system/file_system.dart';
66
import 'package:analyzer/source/file_source.dart';
77
import 'package:analyzer/source/source.dart';
88
import 'package:analyzer/src/generated/source.dart' show UriResolver;
9-
import 'package:analyzer/src/util/asserts.dart' as asserts;
109
import 'package:analyzer/src/utilities/uri_cache.dart';
1110
import 'package:path/path.dart' as pathos;
1211

@@ -28,12 +27,10 @@ class PackageMapUriResolver extends UriResolver {
2827
/// [packageMap] is a table mapping package names to the paths of the
2928
/// directories containing the package
3029
PackageMapUriResolver(this.resourceProvider, this.packageMap) {
31-
asserts.notNull(resourceProvider);
32-
asserts.notNull(packageMap);
3330
packageMap.forEach((name, folders) {
3431
if (folders.length != 1) {
3532
throw ArgumentError(
36-
'Exactly one folder must be specified for a package.'
33+
'Exactly one folder must be specified for a package. '
3734
'Found $name = $folders',
3835
);
3936
}

pkg/analyzer/lib/src/util/asserts.dart

Lines changed: 0 additions & 16 deletions
This file was deleted.

pkg/analyzer/test/src/util/asserts_test.dart

Lines changed: 0 additions & 28 deletions
This file was deleted.

pkg/analyzer/test/src/util/test_all.dart

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
import 'package:test_reflective_loader/test_reflective_loader.dart';
66

7-
import 'asserts_test.dart' as asserts_test;
87
import 'either_test.dart' as either_test;
98
import 'glob_test.dart' as glob_test;
109
import 'lru_map_test.dart' as lru_map_test;
@@ -13,7 +12,6 @@ import 'yaml_test.dart' as yaml_test;
1312
/// Utility for manually running all tests.
1413
main() {
1514
defineReflectiveSuite(() {
16-
asserts_test.main();
1715
either_test.main();
1816
glob_test.main();
1917
lru_map_test.main();

0 commit comments

Comments
 (0)