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

yuxuan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/thrift.git


The following commit(s) were added to refs/heads/master by this push:
     new 4e4461a94 THRIFT-5653: Fix Java UUID typeid
4e4461a94 is described below

commit 4e4461a946df3a426e54023cc238417f2b14a070
Author: Yuxuan 'fishy' Wang <yuxuan.w...@reddit.com>
AuthorDate: Thu Aug 10 08:54:54 2023 -0700

    THRIFT-5653: Fix Java UUID typeid
    
    It should be 16 not 17 according to the spec.
    
    Currently ENUM holds 16, it's not in TBinaryProtocol spec and seems to
    be a Java implementation detail somehow got mixed inside TType, move
    that to -1 for now. Someone more familiar with Java can probably remove
    it from TType completely in the future.
    
    client: java
---
 lib/java/src/main/java/org/apache/thrift/protocol/TType.java | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/lib/java/src/main/java/org/apache/thrift/protocol/TType.java 
b/lib/java/src/main/java/org/apache/thrift/protocol/TType.java
index 5a64e4278..fbcdac33e 100644
--- a/lib/java/src/main/java/org/apache/thrift/protocol/TType.java
+++ b/lib/java/src/main/java/org/apache/thrift/protocol/TType.java
@@ -34,6 +34,8 @@ public final class TType {
   public static final byte MAP = 13;
   public static final byte SET = 14;
   public static final byte LIST = 15;
-  public static final byte ENUM = 16;
-  public static final byte UUID = 17;
+  public static final byte UUID = 16;
+
+  /** This is not part of the TBinaryProtocol spec but Java specific 
implementation detail */
+  public static final byte ENUM = -1;
 }

Reply via email to