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

Side by Side Diff: pkg/analyzer_cli/lib/src/driver.dart

Issue 2136083003: Fix NPE when a resolver provider is given (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library analyzer_cli.src.driver; 5 library analyzer_cli.src.driver;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:convert'; 8 import 'dart:convert';
9 import 'dart:io'; 9 import 'dart:io';
10 10
(...skipping 505 matching lines...) Expand 10 before | Expand all | Expand 10 after
516 } catch (_) { 516 } catch (_) {
517 // Ignore and fall through to null. 517 // Ignore and fall through to null.
518 } 518 }
519 519
520 return null; 520 return null;
521 } 521 }
522 522
523 _PackageInfo _findPackages(CommandLineOptions options) { 523 _PackageInfo _findPackages(CommandLineOptions options) {
524 if (packageResolverProvider != null) { 524 if (packageResolverProvider != null) {
525 // The resolver provider will do all the work later. 525 // The resolver provider will do all the work later.
526 return null; 526 return new _PackageInfo(null, null);
527 } 527 }
528 528
529 Packages packages; 529 Packages packages;
530 Map<String, List<file_system.Folder>> packageMap; 530 Map<String, List<file_system.Folder>> packageMap;
531 531
532 if (options.packageConfigPath != null) { 532 if (options.packageConfigPath != null) {
533 String packageConfigPath = options.packageConfigPath; 533 String packageConfigPath = options.packageConfigPath;
534 Uri fileUri = new Uri.file(packageConfigPath); 534 Uri fileUri = new Uri.file(packageConfigPath);
535 try { 535 try {
536 File configFile = new File.fromUri(fileUri).absolute; 536 File configFile = new File.fromUri(fileUri).absolute;
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after
832 for (var package in packages) { 832 for (var package in packages) {
833 var packageName = path.basename(package.path); 833 var packageName = path.basename(package.path);
834 var realPath = package.resolveSymbolicLinksSync(); 834 var realPath = package.resolveSymbolicLinksSync();
835 result[packageName] = [ 835 result[packageName] = [
836 PhysicalResourceProvider.INSTANCE.getFolder(realPath) 836 PhysicalResourceProvider.INSTANCE.getFolder(realPath)
837 ]; 837 ];
838 } 838 }
839 return result; 839 return result;
840 } 840 }
841 } 841 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698