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

Unified Diff: sdk/lib/_internal/pub/lib/src/lock_file.dart

Issue 26263004: Handle a null dependencies map in lockfile. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 2 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 | « no previous file | sdk/lib/_internal/pub/test/lock_file_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/pub/lib/src/lock_file.dart
diff --git a/sdk/lib/_internal/pub/lib/src/lock_file.dart b/sdk/lib/_internal/pub/lib/src/lock_file.dart
index 1799191bbe28fdc68382506fc30b08904080bed6..e3dff8011d197a68428044a11fd0d96ebefed0d9 100644
--- a/sdk/lib/_internal/pub/lib/src/lock_file.dart
+++ b/sdk/lib/_internal/pub/lib/src/lock_file.dart
@@ -40,9 +40,8 @@ class LockFile {
if (contents.trim() == '') return new LockFile.empty();
var parsed = loadYaml(contents);
- if (parsed.containsKey('packages')) {
- var packageEntries = parsed['packages'];
-
+ var packageEntries = parsed['packages'];
+ if (packageEntries != null) {
packageEntries.forEach((name, spec) {
// Parse the version.
if (!spec.containsKey('version')) {
« no previous file with comments | « no previous file | sdk/lib/_internal/pub/test/lock_file_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698