adriancole commented on a change in pull request #2589: Makes SpanBytesDecoder
work on ByteBuffer
URL: https://github.com/apache/incubator-zipkin/pull/2589#discussion_r283131646
##########
File path: zipkin/src/main/java/zipkin2/internal/JsonCodec.java
##########
@@ -44,14 +44,14 @@
* this should be easy to justify as these objects don't change much at all.
*/
public final class JsonCodec {
+ static final Charset UTF_8 = Charset.forName("UTF-8");
+
// Hides gson types for internal use in other submodules
public static final class JsonReader {
final com.google.gson.stream.JsonReader delegate;
- JsonReader(byte[] bytes) {
- delegate =
- new com.google.gson.stream.JsonReader(
- new InputStreamReader(new ByteArrayInputStream(bytes), UTF_8));
+ JsonReader(ReadBuffer buffer) {
+ delegate = new com.google.gson.stream.JsonReader(new
InputStreamReader(buffer, UTF_8));
Review comment:
our buffer type now backports inputstream so it works directly with gson
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services