8197988: T2 test javax/net/ssl/interop/ClientHelloChromeInterOp.java failed after JDK-8164278
authorsherman
Thu, 15 Feb 2018 00:25:01 -0800
changeset 48900 276b0604eab3
parent 48899 e9676e9ca3d6
child 48901 929de4bd8a12
child 48977 083e6c55a28c
8197988: T2 test javax/net/ssl/interop/ClientHelloChromeInterOp.java failed after JDK-8164278 Reviewed-by: alanb
src/java.base/share/classes/java/util/Base64.java
--- a/src/java.base/share/classes/java/util/Base64.java	Wed Feb 14 16:37:20 2018 -0800
+++ b/src/java.base/share/classes/java/util/Base64.java	Thu Feb 15 00:25:01 2018 -0800
@@ -692,8 +692,9 @@
             int dp = 0;
             int bits = 0;
             int shiftto = 18;       // pos of first byte of 4-byte atom
+
             while (sp < sl) {
-                if (bits == 0 && sp + 4 < sl) {           // fast path
+                if (shiftto == 18 && sp + 4 < sl) {       // fast path
                     int sl0 = sp + ((sl - sp) & ~0b11);
                     while (sp < sl0) {
                         int b1 = base64[src[sp++] & 0xff];