zipkin-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [incubator-zipkin] adriancole commented on a change in pull request #2582: Reuse char[] buffer when decoding hex fields.
Date Sat, 11 May 2019 07:27:49 GMT
adriancole commented on a change in pull request #2582: Reuse char[] buffer when decoding hex
fields.
URL: https://github.com/apache/incubator-zipkin/pull/2582#discussion_r283085935
 
 

 ##########
 File path: zipkin/src/main/java/zipkin2/internal/Proto3Fields.java
 ##########
 @@ -190,15 +197,21 @@ static int decodeLowerHex(char c) {
 
     @Override String readValue(Buffer buffer, int length) {
       length *= 2;
-      char[] result = new char[length];
+
+      // All our hex fields are at most 32 characters.
+      if (length > 32) {
 
 Review comment:
   if that's possible, I'd throw an IllegalArgumentException as that's what we use for other
malformed data at the moment.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message