This is an automated email from the ASF dual-hosted git repository.

nihaljain pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hbase-thirdparty.git


The following commit(s) were added to refs/heads/master by this push:
     new ad09819  HBASE-29303 [hbase-thirdparty] Bump protobuf java to 4.30.2 
(#136)
ad09819 is described below

commit ad09819d42f2ad448ff136840ec02547f91c2ca9
Author: Nihal Jain <[email protected]>
AuthorDate: Tue May 20 22:23:06 2025 +0530

    HBASE-29303 [hbase-thirdparty] Bump protobuf java to 4.30.2 (#136)
    
    * Make changes (manually) required due to 
https://github.com/protocolbuffers/protobuf/commit/a4d4bfeae97dae0eb1212e0d3ee9d3c34718916f
 in HBASE-15789_V4.patch
    * Also rename HBASE-15789_V3.patch to HBASE-15789_V4.patch
    * Gitignore should not ignore patches folder
    
    Signed-off-by: Nick Dimiduk <[email protected]>
    Reviewed-by: Istvan Toth <[email protected]>
    Reviewed-by: Aman Poonia <[email protected]>
---
 .gitignore                                         |  3 +-
 README.md                                          |  2 +-
 .../{HBASE-15789_V3.patch => HBASE-15789_V4.patch} | 42 +++++++++++-----------
 .../src/main/patches/HBASE-17239.patch             | 10 +++---
 pom.xml                                            |  2 +-
 5 files changed, 30 insertions(+), 29 deletions(-)

diff --git a/.gitignore b/.gitignore
index 9af20ec..8f1e942 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,6 +1,7 @@
 **/target
 **/dependency-reduced-pom.xml
-hbase-shaded-protobuf/src/main/
+hbase-shaded-protobuf/src/main/java
+hbase-shaded-protobuf/src/main/resources
 .project
 .settings
 .classpath
diff --git a/README.md b/README.md
index 8352d2e..e070c1f 100644
--- a/README.md
+++ b/README.md
@@ -43,7 +43,7 @@ rather than to a dir under target because the jar plugin 
wants src here (its
 hard to convince it otherwise). We also apply some patches. Current set are:
 
 ```
-HBASE-15789_V3.patch
+HBASE-15789_V4.patch
 HBASE-17087.patch
 HBASE-17239.patch
 ```
diff --git a/hbase-shaded-protobuf/src/main/patches/HBASE-15789_V3.patch 
b/hbase-shaded-protobuf/src/main/patches/HBASE-15789_V4.patch
similarity index 98%
rename from hbase-shaded-protobuf/src/main/patches/HBASE-15789_V3.patch
rename to hbase-shaded-protobuf/src/main/patches/HBASE-15789_V4.patch
index 6f9fd05..c02bbb8 100644
--- a/hbase-shaded-protobuf/src/main/patches/HBASE-15789_V3.patch
+++ b/hbase-shaded-protobuf/src/main/patches/HBASE-15789_V4.patch
@@ -359,10 +359,10 @@ index 000000000..320977290
 +  }
 +}
 diff --git a/src/main/java/com/google/protobuf/ByteString.java 
b/src/main/java/com/google/protobuf/ByteString.java
-index 7b2455f12..f906a4774 100644
+index 558d5a6ab..28795acc2 100644
 --- a/src/main/java/com/google/protobuf/ByteString.java
 +++ b/src/main/java/com/google/protobuf/ByteString.java
-@@ -430,6 +430,13 @@ public abstract class ByteString implements 
Iterable<Byte>, Serializable {
+@@ -429,6 +429,13 @@ public abstract class ByteString implements 
Iterable<Byte>, Serializable {
      return new NioByteString(buffer);
    }
 
@@ -383,13 +383,13 @@ index 7b2455f12..f906a4774 100644
 -
 -    private LeafByteString() {}
    }
- 
+
    /**
 diff --git a/src/main/java/com/google/protobuf/CodedInputStream.java 
b/src/main/java/com/google/protobuf/CodedInputStream.java
-index 81da41778..80fd9153c 100644
+index fbdabf225..cd6f80779 100644
 --- a/src/main/java/com/google/protobuf/CodedInputStream.java
 +++ b/src/main/java/com/google/protobuf/CodedInputStream.java
-@@ -178,6 +178,15 @@ public abstract class CodedInputStream {
+@@ -191,6 +191,15 @@ public abstract class CodedInputStream {
      }
    }
 
@@ -404,8 +404,8 @@ index 81da41778..80fd9153c 100644
 +
    /** Disable construction/inheritance outside of this class. */
    private CodedInputStream() {}
- 
-@@ -3970,4 +3979,652 @@ public abstract class CodedInputStream {
+
+@@ -3943,4 +3952,652 @@ public abstract class CodedInputStream {
        }
      }
    }
@@ -643,25 +643,25 @@ index 81da41778..80fd9153c 100644
 +    @Override
 +    public void readGroup(int fieldNumber, MessageLite.Builder builder,
 +        ExtensionRegistryLite extensionRegistry) throws IOException {
-+      if (recursionDepth >= recursionLimit) {
++      if (messageDepth + groupDepth >= recursionLimit) {
 +        throw InvalidProtocolBufferException.recursionLimitExceeded();
 +      }
-+      ++recursionDepth;
++      ++groupDepth;
 +      builder.mergeFrom(this, extensionRegistry);
 +      checkLastTagWas(WireFormat.makeTag(fieldNumber, 
WireFormat.WIRETYPE_END_GROUP));
-+      --recursionDepth;
++      --groupDepth;
 +    }
 +
 +    @Override
 +    public <T extends MessageLite> T readGroup(int fieldNumber, Parser<T> 
parser,
 +        ExtensionRegistryLite extensionRegistry) throws IOException {
-+      if (recursionDepth >= recursionLimit) {
++      if (messageDepth + groupDepth >= recursionLimit) {
 +        throw InvalidProtocolBufferException.recursionLimitExceeded();
 +      }
-+      ++recursionDepth;
++      ++groupDepth;
 +      T result = parser.parsePartialFrom(this, extensionRegistry);
 +      checkLastTagWas(WireFormat.makeTag(fieldNumber, 
WireFormat.WIRETYPE_END_GROUP));
-+      --recursionDepth;
++      --groupDepth;
 +      return result;
 +    }
 +
@@ -675,14 +675,14 @@ index 81da41778..80fd9153c 100644
 +    public void readMessage(MessageLite.Builder builder, 
ExtensionRegistryLite extensionRegistry)
 +        throws IOException {
 +      final int length = readRawVarint32();
-+      if (recursionDepth >= recursionLimit) {
++      if (messageDepth + groupDepth >= recursionLimit) {
 +        throw InvalidProtocolBufferException.recursionLimitExceeded();
 +      }
 +      final int oldLimit = pushLimit(length);
-+      ++recursionDepth;
++      ++messageDepth;
 +      builder.mergeFrom(this, extensionRegistry);
 +      checkLastTagWas(0);
-+      --recursionDepth;
++      --messageDepth;
 +      popLimit(oldLimit);
 +    }
 +
@@ -690,14 +690,14 @@ index 81da41778..80fd9153c 100644
 +    public <T extends MessageLite> T readMessage(Parser<T> parser,
 +        ExtensionRegistryLite extensionRegistry) throws IOException {
 +      int length = readRawVarint32();
-+      if (recursionDepth >= recursionLimit) {
++      if (messageDepth + groupDepth >= recursionLimit) {
 +        throw InvalidProtocolBufferException.recursionLimitExceeded();
 +      }
 +      final int oldLimit = pushLimit(length);
-+      ++recursionDepth;
++      ++messageDepth;
 +      T result = parser.parsePartialFrom(this, extensionRegistry);
 +      checkLastTagWas(0);
-+      --recursionDepth;
++      --messageDepth;
 +      popLimit(oldLimit);
 +      return result;
 +    }
@@ -1065,7 +1065,7 @@ index d52006754..92ed1f1f7 100644
 @@ -196,6 +196,16 @@ final class Utf8 {
      }
    }
- 
+
 +  private static int incompleteStateFor(ByteInput bytes, int index, int 
limit) {
 +    int byte1 = bytes.read(index - 1);
 +    switch (limit - index) {
@@ -1082,7 +1082,7 @@ index d52006754..92ed1f1f7 100644
 @@ -318,6 +328,24 @@ final class Utf8 {
      return processor.decodeUtf8(bytes, index, size);
    }
- 
+
 +  /**
 +   * Determines if the given {@link ByteInput} is a valid UTF-8 string.
 +   *
diff --git a/hbase-shaded-protobuf/src/main/patches/HBASE-17239.patch 
b/hbase-shaded-protobuf/src/main/patches/HBASE-17239.patch
index fc2a172..19bb9eb 100644
--- a/hbase-shaded-protobuf/src/main/patches/HBASE-17239.patch
+++ b/hbase-shaded-protobuf/src/main/patches/HBASE-17239.patch
@@ -1,10 +1,10 @@
 diff --git a/src/main/java/com/google/protobuf/CodedInputStream.java 
b/src/main/java/com/google/protobuf/CodedInputStream.java
-index 80fd9153c..11de874dd 100644
+index cd6f80779..3c6d8e878 100644
 --- a/src/main/java/com/google/protobuf/CodedInputStream.java
 +++ b/src/main/java/com/google/protobuf/CodedInputStream.java
-@@ -179,11 +179,7 @@ public abstract class CodedInputStream {
+@@ -192,11 +192,7 @@ public abstract class CodedInputStream {
    }
- 
+
    /** Create a new CodedInputStream wrapping the given {@link ByteInput}. */
 -  public static CodedInputStream newInstance(ByteInput buf, boolean 
bufferIsImmutable) {
 -    return new ByteInputDecoder(buf, bufferIsImmutable);
@@ -14,7 +14,7 @@ index 80fd9153c..11de874dd 100644
 +  static CodedInputStream newInstance(ByteInput buf, int off, int len, 
boolean bufferIsImmutable) {
      return new ByteInputDecoder(buf, off, len, bufferIsImmutable);
    }
- 
+
 diff --git a/src/main/java/com/google/protobuf/UnsafeByteOperations.java 
b/src/main/java/com/google/protobuf/UnsafeByteOperations.java
 index 15c1da969..54d2f975a 100644
 --- a/src/main/java/com/google/protobuf/UnsafeByteOperations.java
@@ -22,7 +22,7 @@ index 15c1da969..54d2f975a 100644
 @@ -74,6 +74,17 @@ public final class UnsafeByteOperations {
      return ByteString.wrap(buffer);
    }
- 
+
 +  /**
 +   * An unsafe operation that returns a {@link ByteString} that is backed by 
the provided buffer.
 +   * @param buffer the ByteInput buffer to be wrapped
diff --git a/pom.xml b/pom.xml
index eba66ea..80dbc37 100644
--- a/pom.xml
+++ b/pom.xml
@@ -132,7 +132,7 @@
     <maven.min.version>3.3.3</maven.min.version>
     <os.maven.version>1.7.1</os.maven.version>
     <rename.offset>org.apache.hbase.thirdparty</rename.offset>
-    <protobuf.version>4.29.2</protobuf.version>
+    <protobuf.version>4.30.2</protobuf.version>
     <netty.version>4.1.121.Final</netty.version>
     <netty.tcnative.version>2.0.71.Final</netty.tcnative.version>
     <guava.version>33.4.8-jre</guava.version>

Reply via email to