From 54edeb0db1d2a60d23223e191e320df8144280e5 Mon Sep 17 00:00:00 2001 From: Josh Elser Date: Mon, 19 Mar 2018 11:54:58 -0400 Subject: [PATCH 2/2] HBASE-20221 Bump protobuf to 3.5.1 Required fixing the FIXED_XX_SIZE constants as they were renamed --- hbase-shaded-protobuf/pom.xml | 2 +- hbase-shaded-protobuf/src/main/patches/HBASE-15789_V2.patch | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/hbase-shaded-protobuf/pom.xml b/hbase-shaded-protobuf/pom.xml index b60890b..ad2ddf7 100644 --- a/hbase-shaded-protobuf/pom.xml +++ b/hbase-shaded-protobuf/pom.xml @@ -32,7 +32,7 @@ Pulls down protobuf, patches it, compiles, and then relocates/shades. - 3.3.1 + 3.5.1 diff --git a/hbase-shaded-protobuf/src/main/patches/HBASE-15789_V2.patch b/hbase-shaded-protobuf/src/main/patches/HBASE-15789_V2.patch index e91559c..cef5cfc 100644 --- a/hbase-shaded-protobuf/src/main/patches/HBASE-15789_V2.patch +++ b/hbase-shaded-protobuf/src/main/patches/HBASE-15789_V2.patch @@ -457,7 +457,7 @@ index 12d70ce..e4c8e05 100644 + skipRawVarint(); + return true; + case WireFormat.WIRETYPE_FIXED64: -+ skipRawBytes(FIXED_64_SIZE); ++ skipRawBytes(FIXED64_SIZE); + return true; + case WireFormat.WIRETYPE_LENGTH_DELIMITED: + skipRawBytes(readRawVarint32()); @@ -470,7 +470,7 @@ index 12d70ce..e4c8e05 100644 + case WireFormat.WIRETYPE_END_GROUP: + return false; + case WireFormat.WIRETYPE_FIXED32: -+ skipRawBytes(FIXED_32_SIZE); ++ skipRawBytes(FIXED32_SIZE); + return true; + default: + throw InvalidProtocolBufferException.invalidWireType(); @@ -869,11 +869,11 @@ index 12d70ce..e4c8e05 100644 + public int readRawLittleEndian32() throws IOException { + int tempPos = pos; + -+ if (limit - tempPos < FIXED_32_SIZE) { ++ if (limit - tempPos < FIXED32_SIZE) { + throw InvalidProtocolBufferException.truncatedMessage(); + } + -+ pos = tempPos + FIXED_32_SIZE; ++ pos = tempPos + FIXED32_SIZE; + return (((buffer.read(tempPos) & 0xff)) + | ((buffer.read(tempPos + 1) & 0xff) << 8) + | ((buffer.read(tempPos + 2) & 0xff) << 16) @@ -884,11 +884,11 @@ index 12d70ce..e4c8e05 100644 + public long readRawLittleEndian64() throws IOException { + int tempPos = pos; + -+ if (limit - tempPos < FIXED_64_SIZE) { ++ if (limit - tempPos < FIXED64_SIZE) { + throw InvalidProtocolBufferException.truncatedMessage(); + } + -+ pos = tempPos + FIXED_64_SIZE; ++ pos = tempPos + FIXED64_SIZE; + return (((buffer.read(tempPos) & 0xffL)) + | ((buffer.read(tempPos + 1) & 0xffL) << 8) + | ((buffer.read(tempPos + 2) & 0xffL) << 16) -- 2.16.2