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

Unified Diff: pkg/analysis_server/lib/src/channel/channel.dart

Issue 1827803002: Make convert library strong-mode compliant. Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Fix more converters. Created 4 years, 9 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 | « no previous file | runtime/lib/convert_patch.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/lib/src/channel/channel.dart
diff --git a/pkg/analysis_server/lib/src/channel/channel.dart b/pkg/analysis_server/lib/src/channel/channel.dart
index f3e473de8458edfe0545bf5ceddb340be4c0e2e5..bee6f359fe7df2d4420b771eba183c1b4dad40b9 100644
--- a/pkg/analysis_server/lib/src/channel/channel.dart
+++ b/pkg/analysis_server/lib/src/channel/channel.dart
@@ -85,12 +85,13 @@ abstract class ClientCommunicationChannel {
* Instances of the class [JsonStreamDecoder] convert JSON strings to JSON
* maps.
*/
-class JsonStreamDecoder extends Converter<String, Map> {
+class JsonStreamDecoder extends
+ ChunkedConverter<String, Map, String, Map> {
@override
Map convert(String text) => JSON.decode(text);
@override
- ChunkedConversionSink startChunkedConversion(Sink sink) =>
+ ChunkedConversionSink<String> startChunkedConversion(Sink<Map> sink) =>
new ChannelChunkSink<String, Map>(this, sink);
}
@@ -98,24 +99,26 @@ class JsonStreamDecoder extends Converter<String, Map> {
* Instances of the class [NotificationConverter] convert JSON maps to
* [Notification]s.
*/
-class NotificationConverter extends Converter<Map, Notification> {
+class NotificationConverter extends
+ ChunkedConverter<Map, Notification, Map, Notification> {
@override
Notification convert(Map json) => new Notification.fromJson(json);
@override
- ChunkedConversionSink startChunkedConversion(Sink sink) =>
+ ChunkedConversionSink<Map> startChunkedConversion(Sink<Notification> sink) =>
new ChannelChunkSink<Map, Notification>(this, sink);
}
/**
* Instances of the class [ResponseConverter] convert JSON maps to [Response]s.
*/
-class ResponseConverter extends Converter<Map, Response> {
+class ResponseConverter extends
+ ChunkedConverter<Map, Response, Map, Response> {
@override
Response convert(Map json) => new Response.fromJson(json);
@override
- ChunkedConversionSink startChunkedConversion(Sink sink) =>
+ ChunkedConversionSink<Map> startChunkedConversion(Sink<Response> sink) =>
new ChannelChunkSink<Map, Response>(this, sink);
}
« no previous file with comments | « no previous file | runtime/lib/convert_patch.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698