hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r1774082 - /httpcomponents/httpcore/trunk/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/frame/FramePrinter.java
Date Tue, 13 Dec 2016 19:26:41 GMT
Author: olegk
Date: Tue Dec 13 19:26:41 2016
New Revision: 1774082

URL: http://svn.apache.org/viewvc?rev=1774082&view=rev
Log:
Prettier hex dump format

Modified:
    httpcomponents/httpcore/trunk/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/frame/FramePrinter.java

Modified: httpcomponents/httpcore/trunk/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/frame/FramePrinter.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/frame/FramePrinter.java?rev=1774082&r1=1774081&r2=1774082&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/frame/FramePrinter.java
(original)
+++ httpcomponents/httpcore/trunk/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/frame/FramePrinter.java
Tue Dec 13 19:26:41 2016
@@ -200,7 +200,11 @@ public final class FramePrinter {
                 for (int i = 0; i < chunk; i++) {
                     appendable.append(' ');
                     final int b = line[i] & 0xff;
-                    appendable.append(Integer.toHexString(b));
+                    final String s = Integer.toHexString(b);
+                    if (s.length() == 1) {
+                        appendable.append("0");
+                    }
+                    appendable.append(s);
                 }
                 appendable.append("\r\n");
             }



Mime
View raw message