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

Unified Diff: sdk/lib/convert/utf.dart

Issue 2035473003: Avoid runtime type errors in checked mode for ChunkedConverters. (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/convert/line_splitter.dart ('k') | sdk/lib/io/data_transformer.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/convert/utf.dart
diff --git a/sdk/lib/convert/utf.dart b/sdk/lib/convert/utf.dart
index 69bb72cb0f93ffac3b935a1523b6d1126a087ef1..aeee9ef8bf2806f71598341aaa695c2ceacb80a8 100644
--- a/sdk/lib/convert/utf.dart
+++ b/sdk/lib/convert/utf.dart
@@ -76,7 +76,8 @@ class Utf8Codec extends Encoding {
* This class converts strings to their UTF-8 code units (a list of
* unsigned 8-bit integers).
*/
-class Utf8Encoder extends Converter<String, List<int>> {
+class Utf8Encoder extends Converter<String, List<int>>
+ implements ChunkedConverter<String, List<int>, String, List<int>> {
const Utf8Encoder();
@@ -304,7 +305,9 @@ class _Utf8EncoderSink extends _Utf8Encoder with StringConversionSinkMixin {
* This class converts UTF-8 code units (lists of unsigned 8-bit integers)
* to a string.
*/
-class Utf8Decoder extends Converter<List<int>, String> {
+class Utf8Decoder extends Converter<List<int>, String>
+ implements ChunkedConverter<List<int>, String, List<int>, String> {
+
final bool _allowMalformed;
/**
« no previous file with comments | « sdk/lib/convert/line_splitter.dart ('k') | sdk/lib/io/data_transformer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698