Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(385)

Unified Diff: lib/src/system_cache.dart

Issue 2184303002: Make pub strong-mode clean. (Closed) Base URL: git@github.com:dart-lang/pub.git@master
Patch Set: Code review changes Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « lib/src/source/hosted.dart ('k') | lib/src/utils.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/system_cache.dart
diff --git a/lib/src/system_cache.dart b/lib/src/system_cache.dart
index 0580547fd34a0e1579aa86cc8d59b00f80b385b4..0ad1541aac4eb2857460a3ccf8e55ead908bd055 100644
--- a/lib/src/system_cache.dart
+++ b/lib/src/system_cache.dart
@@ -101,11 +101,8 @@ class SystemCache {
bool contains(PackageId id) {
var source = this.source(id.source);
- if (source is! CachedSource) {
- throw new ArgumentError("Package $id is not cacheable.");
- }
-
- return source.isInSystemCache(id);
+ if (source is CachedSource) return source.isInSystemCache(id);
+ throw new ArgumentError("Package $id is not cacheable.");
}
/// Create a new temporary directory within the system cache.
« no previous file with comments | « lib/src/source/hosted.dart ('k') | lib/src/utils.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698