commit | e7be010971ffeeab87f200980a9038da6f632490 | [log] [tgz] |
---|---|---|
author | Konstantin Shcheglov <scheglov@google.com> | Wed Sep 05 19:46:58 2018 +0000 |
committer | commit-bot@chromium.org <commit-bot@chromium.org> | Wed Sep 05 19:46:58 2018 +0000 |
tree | cff988cae324d79aebe59c55efa80b176398323d | |
parent | e07af58238501bf5fdba9fd286c46b648bcbcf1b [diff] |
Safer FileSystemState.hasUri SourceFactory.forUri2() can return null. R=brianwilkerson@google.com Bug: https://github.com/dart-lang/sdk/issues/33859 Bug: https://github.com/dart-lang/sdk/issues/33233 Change-Id: I34908cd9d04050cc2afcdc716c6bb68d4f177702 Reviewed-on: https://dart-review.googlesource.com/73242 Reviewed-by: Brian Wilkerson <brianwilkerson@google.com> Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
diff --git a/pkg/analyzer/lib/src/dart/analysis/file_state.dart b/pkg/analyzer/lib/src/dart/analysis/file_state.dart index 6102bf7..b048577 100644 --- a/pkg/analyzer/lib/src/dart/analysis/file_state.dart +++ b/pkg/analyzer/lib/src/dart/analysis/file_state.dart
@@ -894,7 +894,7 @@ Source fileSource = resource.createSource(); Uri uri = _sourceFactory.restoreUri(fileSource); Source uriSource = _sourceFactory.forUri2(uri); - flag = uriSource.fullName == path; + flag = uriSource?.fullName == path; _hasUriForPath[path] = flag; } return flag;