Version 2.12.0-95.0.dev
Merge commit '94a7c94855816c806118ea8bf77a37edd7358270' into 'dev'
diff --git a/pkg/analyzer/lib/src/dart/analysis/file_state.dart b/pkg/analyzer/lib/src/dart/analysis/file_state.dart
index 00d6c6f..32bb30c 100644
--- a/pkg/analyzer/lib/src/dart/analysis/file_state.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/file_state.dart
@@ -1083,21 +1083,25 @@
_FileContent get(String path, bool allowCached) {
var file = allowCached ? _pathToFile[path] : null;
if (file == null) {
+ List<int> contentBytes;
String content;
bool exists;
try {
if (_contentOverlay != null) {
content = _contentOverlay[path];
+ if (content != null) {
+ contentBytes = utf8.encode(content);
+ }
}
- content ??= _resourceProvider.getFile(path).readAsStringSync();
+ contentBytes ??= _resourceProvider.getFile(path).readAsBytesSync();
+ content = utf8.decode(contentBytes);
exists = true;
} catch (_) {
+ contentBytes = Uint8List(0);
content = '';
exists = false;
}
- List<int> contentBytes = utf8.encode(content);
-
List<int> contentHashBytes = md5.convert(contentBytes).bytes;
String contentHash = hex.encode(contentHashBytes);
diff --git a/tools/VERSION b/tools/VERSION
index 514a37f..72d2b2c 100644
--- a/tools/VERSION
+++ b/tools/VERSION
@@ -27,5 +27,5 @@
MAJOR 2
MINOR 12
PATCH 0
-PRERELEASE 94
+PRERELEASE 95
PRERELEASE_PATCH 0
\ No newline at end of file