| Index: pkg/analyzer_experimental/lib/src/generated/source_io.dart
|
| diff --git a/pkg/analyzer_experimental/lib/src/generated/source_io.dart b/pkg/analyzer_experimental/lib/src/generated/source_io.dart
|
| index c2277eba896798d12b082c25485883dc2c141cc0..e31849406a7ba48e46a9f051e5ac53b6e3e1faf8 100644
|
| --- a/pkg/analyzer_experimental/lib/src/generated/source_io.dart
|
| +++ b/pkg/analyzer_experimental/lib/src/generated/source_io.dart
|
| @@ -56,7 +56,14 @@ class FileBasedSource implements Source {
|
| this._contentCache = contentCache;
|
| this._file = file;
|
| this._uriKind = uriKind;
|
| - this._encoding = "${uriKind.encoding}${file.toURI().toString()}";
|
| + if (file.getPath().indexOf(':') > 2) {
|
| + try {
|
| + throw new IllegalArgumentException("Invalid source path: ${file}");
|
| + } on IllegalArgumentException catch (e) {
|
| + AnalysisEngine.instance.logger.logError3(e);
|
| + throw e;
|
| + }
|
| + }
|
| }
|
| bool operator ==(Object object) => object != null && this.runtimeType == object.runtimeType && _file == ((object as FileBasedSource))._file;
|
| bool exists() => _contentCache.getContents(this) != null || (_file.exists() && !_file.isDirectory());
|
| @@ -70,7 +77,12 @@ class FileBasedSource implements Source {
|
| }
|
| receiver.accept2(_file.readAsStringSync(), _file.lastModified());
|
| }
|
| - String get encoding => _encoding;
|
| + String get encoding {
|
| + if (_encoding == null) {
|
| + _encoding = "${_uriKind.encoding}${_file.toURI().toString()}";
|
| + }
|
| + return _encoding;
|
| + }
|
| String get fullName => _file.getAbsolutePath();
|
| int get modificationStamp {
|
| int stamp = _contentCache.getModificationStamp(this);
|
|
|