From 07bfd4a14efab5f55a947415ff34af0a09e9bba4 Mon Sep 17 00:00:00 2001 From: stack Date: Fri, 29 Mar 2019 10:31:19 -0700 Subject: [PATCH] HBASE-22130 [hbase-thirdparty] Upgrade thirdparty dependencies Updates: gson 2.8.1 -> 2.8.5 guava 22.0 -> 27.1-jre pb 3.5.1 -> 3.7.0 netty 4.1.17 -> 4.1.34 commons-collections4 4.1 -> 4.3 Updated apache parent pom from 18 to 21 and misc plugins. --- hbase-shaded-miscellaneous/pom.xml | 13 +++++++------ hbase-shaded-netty/pom.xml | 2 +- hbase-shaded-protobuf/pom.xml | 2 +- .../src/main/patches/HBASE-15789_V2.patch | 15 ++++++++++----- pom.xml | 10 +++++----- 5 files changed, 24 insertions(+), 18 deletions(-) diff --git a/hbase-shaded-miscellaneous/pom.xml b/hbase-shaded-miscellaneous/pom.xml index 8ab697c..f860718 100644 --- a/hbase-shaded-miscellaneous/pom.xml +++ b/hbase-shaded-miscellaneous/pom.xml @@ -114,12 +114,12 @@ com.google.code.gson gson - 2.8.1 + 2.8.5 com.google.guava guava - 22.0 + 27.1-jre com.google.code.findbugs @@ -142,9 +142,10 @@ com.google.protobuf protobuf-java-util - - 3.3.0 + + 3.7.0 com.google.protobuf @@ -160,7 +161,7 @@ org.apache.commons commons-collections4 - 4.1 + 4.3 diff --git a/hbase-shaded-netty/pom.xml b/hbase-shaded-netty/pom.xml index 5cc5465..ce5fe35 100644 --- a/hbase-shaded-netty/pom.xml +++ b/hbase-shaded-netty/pom.xml @@ -144,7 +144,7 @@ io.netty netty-all - 4.1.17.Final + 4.1.34.Final diff --git a/hbase-shaded-protobuf/pom.xml b/hbase-shaded-protobuf/pom.xml index 18a8e98..dad30d1 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.5.1 + 3.7.0 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 cef5cfc..c3300c5 100644 --- a/hbase-shaded-protobuf/src/main/patches/HBASE-15789_V2.patch +++ b/hbase-shaded-protobuf/src/main/patches/HBASE-15789_V2.patch @@ -5,11 +5,11 @@ index c0ed636..906c216 100644 @@ -112,7 +112,7 @@ final class ByteBufferWriter { } } - + - private static byte[] getOrCreateBuffer(int requestedSize) { + static byte[] getOrCreateBuffer(int requestedSize) { requestedSize = max(requestedSize, MIN_CACHED_BUFFER_SIZE); - + byte[] buffer = getBuffer(); diff --git a/src/main/java/com/google/protobuf/ByteInput.java b/src/main/java/com/google/protobuf/ByteInput.java new file mode 100644 @@ -103,7 +103,7 @@ new file mode 100644 index 0000000..1949602 --- /dev/null +++ b/src/main/java/com/google/protobuf/ByteInputByteString.java -@@ -0,0 +1,249 @@ +@@ -0,0 +1,254 @@ +// Protocol Buffers - Google's data interchange format +// Copyright 2008 Google Inc. All rights reserved. +// https://developers.google.com/protocol-buffers/ @@ -187,6 +187,11 @@ index 0000000..1949602 + return buffer.read(getAbsoluteOffset(index)); + } + ++ @Override ++ byte internalByteAt(int index) { ++ return buffer.read(getAbsoluteOffset(index)); ++ } ++ + private int getAbsoluteOffset(int relativeOffset) { + return this.offset + relativeOffset; + } @@ -368,8 +373,8 @@ index 8cae888..ebfa7fa 100644 + } + + /** - * Wraps the given bytes into a {@code ByteString}. Intended for internal only - * usage to force a classload of ByteString before LiteralByteString. + * Wraps the given bytes into a {@code ByteString}. Intended for internal only usage to force a + * classload of ByteString before LiteralByteString. */ diff --git a/src/main/java/com/google/protobuf/CodedInputStream.java b/src/main/java/com/google/protobuf/CodedInputStream.java index 12d70ce..e4c8e05 100644 diff --git a/pom.xml b/pom.xml index 2af80de..8d1ca4e 100644 --- a/pom.xml +++ b/pom.xml @@ -32,7 +32,7 @@ org.apache apache - 18 + 21 @@ -150,7 +150,7 @@ org.codehaus.mojo build-helper-maven-plugin - 1.9.1 + 3.0.0 org.apache.rat @@ -214,7 +214,7 @@ org.apache.maven.plugins maven-shade-plugin - 3.0.0 + 3.2.1 @@ -235,7 +235,7 @@ org.apache.maven.plugins maven-enforcer-plugin - 1.4 + 1.4.1 org.codehaus.mojo @@ -283,7 +283,7 @@ maven-assembly-plugin - 3.0.0 + 3.1.1 src/main/assembly/src.xml -- 2.19.1