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

Unified Diff: sdk/lib/io/file_impl.dart

Issue 1974043002: Revert "Fix remaining strong-mode warnings and errors in dart:io." (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 7 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 | « sdk/lib/io/directory_impl.dart ('k') | sdk/lib/io/http_impl.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/io/file_impl.dart
diff --git a/sdk/lib/io/file_impl.dart b/sdk/lib/io/file_impl.dart
index bb00477aa1d89b8d92478797d686f8196e0d20e5..a6fdde8e4d6e6390d3b5c3081e2f5e1ace3af4b3 100644
--- a/sdk/lib/io/file_impl.dart
+++ b/sdk/lib/io/file_impl.dart
@@ -213,7 +213,7 @@ class _FileStreamConsumer extends StreamConsumer<List<int>> {
}
Future<File> close() =>
- _openFuture.then/*<File>*/((openedFile) => openedFile.close());
+ _openFuture.then((openedFile) => openedFile.close());
}
@@ -441,9 +441,9 @@ class _File extends FileSystemEntity implements File {
}
Future<List<int>> readAsBytes() {
- Future<List<int>> readDataChunked(RandomAccessFile file) {
+ Future<List<int>> readDataChunked(file) {
var builder = new BytesBuilder(copy: false);
- var completer = new Completer<List<int>>();
+ var completer = new Completer();
void read() {
file.read(_BLOCK_SIZE).then((data) {
if (data.length > 0) {
@@ -472,7 +472,7 @@ class _File extends FileSystemEntity implements File {
List<int> readAsBytesSync() {
var opened = openSync();
try {
- List<int> data;
+ var data;
var length = opened.lengthSync();
if (length == 0) {
// May be character device, try to read it in chunks.
@@ -670,7 +670,7 @@ class _RandomAccessFile implements RandomAccessFile {
throw _exceptionFromResponse(response, "read failed", path);
}
_resourceInfo.addRead(response[1].length);
- return response[1] as Object/*=List<int>*/;
+ return response[1];
});
}
@@ -684,7 +684,7 @@ class _RandomAccessFile implements RandomAccessFile {
throw new FileSystemException("readSync failed", path, result);
}
_resourceInfo.addRead(result.length);
- return result as Object/*=List<int>*/;
+ return result;
}
Future<int> readInto(List<int> buffer, [int start = 0, int end]) {
@@ -703,7 +703,7 @@ class _RandomAccessFile implements RandomAccessFile {
throw _exceptionFromResponse(response, "readInto failed", path);
}
var read = response[1];
- var data = response[2] as Object/*=List<int>*/;
+ var data = response[2];
buffer.setRange(start, start + read, data);
_resourceInfo.addRead(read);
return read;
« no previous file with comments | « sdk/lib/io/directory_impl.dart ('k') | sdk/lib/io/http_impl.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698